** (BadMapError) expected a map, got: #Function<7.126501267/1 in :erl_eval.expr/5>

:maps functions work on maps, not lists. When working with lists, I’d probably use Enum module.