[erlang-questions] Wanted additions to the maps module?

Grzegorz Junka list1@REDACTED
Sat May 7 08:20:40 CEST 2016


All right, you wanted to zip two lists into a map, rather than two maps 
into a new map.


On 06/05/2016 22:06, Andrew Berman wrote:
> The same way lists:zip/2 does it with the position in each list.  So, 
> maps:zip([key1, key2, key3],[val1, val2, val3]) = #{key1 => val1, key2 
> => val2, key3 => val3}.
>
> http://erlang.org/doc/man/lists.html#zip-2
>
> On Fri, May 6, 2016 at 1:27 PM Grzegorz Junka <list1@REDACTED 
> <mailto:list1@REDACTED>> wrote:
>
>     Andrew, how would the zip function know which keys to join with
>     which values? Unless you mean only zipping values for the same keys?
>
>
>     On 06/05/2016 20:19, Andrew Berman wrote:
>>     Not sure if this was mentioned yet, but a maps:zip addition like
>>     what is in lists only building a map would be really handy.
>>
>>     On Fri, May 6, 2016 at 10:26 AM Robert Virding
>>     <rvirding@REDACTED <mailto:rvirding@REDACTED>> wrote:
>>
>>         Yes, I am not alone in wanting these!
>>
>>         Robert
>>
>>
>>         On 6 May 2016 at 18:12, Jean Chassoul <chassoul@REDACTED
>>         <mailto:chassoul@REDACTED>> wrote:
>>
>>
>>             On Thu, Apr 21, 2016 at 5:09 PM, Robert Virding
>>             <rvirding@REDACTED <mailto:rvirding@REDACTED>> wrote:
>>
>>                 My maps:first/1 and maps:next/2will be coming when? :-)
>>
>>
>>             +1
>>
>>             (=
>>
>>
>>             _______________________________________________
>>             erlang-questions mailing list
>>             erlang-questions@REDACTED
>>             <mailto:erlang-questions@REDACTED>
>>             http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>         _______________________________________________
>>         erlang-questions mailing list
>>         erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>>         http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>>     _______________________________________________
>>     erlang-questions mailing list
>>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>>     http://erlang.org/mailman/listinfo/erlang-questions
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160507/b5e9a250/attachment.htm>


More information about the erlang-questions mailing list