[erlang-questions] maps:keys/1, values/1 stability?
Sat Dec 12 13:16:12 CET 2015
The implementation in 18.1 (
certainly looks like they use the same ordering.
However, it would _never_ be a good idea to depend on that behavior. If you
need to loop over key/value pairs, use maps:map/2 or maps:fold/3 or
On Fri, Dec 11, 2015 at 1:35 PM, 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.
> Kevin Montuori
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions