How to nest a list into a map?

Hello!

Sorry, I do not fully understand your pseudo code.
Could you express desired input and output using elixir terms?