[erlang-questions] maps:keys/1, values/1 stability?

Tony Rogvall tony@REDACTED
Sat Dec 12 11:52:16 CET 2015


Maybe these examples can shed some light on the order issue? check the output
on the expressions below on R18.

maps:keys(maps:from_list([{I,I} || I <- lists:seq(1,32)])).


maps:keys(maps:from_list([{I,I} || I <- lists:seq(1,33)])).

The assertion is however correct ( I hope :-) .

/Tony

> On 11 dec 2015, at 19:35, Kevin Montuori <montuori@REDACTED> wrote:
> 
> 
> Hi All --
> 
> The maps documenation indicates that keys/1 and values/1 will return
> results in arbitrary order, which makes sense.  I'm wondering if they'll
> return in the *same* arbitrary order.  In other words, is this assertion
> always correct?
> 
>  M = maps:from_list(lists:zip(maps:keys(M), maps:values(M))).
> 
> Thanks for any insight.
> 
> k.
> 
> --
>  Kevin Montuori
>  montuori@REDACTED
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151212/982abce8/attachment.bin>


More information about the erlang-questions mailing list