Erlang/OTP 27 [erts-15.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Eshell V15.2.1 (press Ctrl+G to abort, type help(). for help)
1> #{ K => V || K <- [1,2,3], V <- [a,b,c]}.
#{1 => a,2 => a,3 => a}
2> maps:from_list([{K,V} || K <- [1,2,3], V <- [a,b,c]]).
#{1 => c,2 => c,3 => c}
I guess the docs are silent about the order in which the second list is processed, but wouldn’t it be reasonable to assume the two expressions above to be equivalent?
Granted, I will not volunteer a more detailed specification. ![]()
BR,
Ulf W