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

Andrew Berman <>
Sat May 7 00:06:09 CEST 2016


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 <> 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 <> wrote:
>
>> Yes, I am not alone in wanting these!
>>
>> Robert
>>
>>
>> On 6 May 2016 at 18:12, Jean Chassoul <> wrote:
>>
>>>
>>> On Thu, Apr 21, 2016 at 5:09 PM, Robert Virding <>
>>> wrote:
>>>
>>>> My maps:first/1 and maps:next/2will be coming when? :-)
>>>>
>>>>
>>> +1
>>>
>>> (=
>>>
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> 
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>
> _______________________________________________
> erlang-questions mailing ://erlang.org/mailman/listinfo/erlang-questions
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160506/c8032eb7/attachment.html>


More information about the erlang-questions mailing list