[erlang-questions] maps iterator

zxq9 <>
Tue Sep 29 00:43:05 CEST 2015


On 2015年9月28日 月曜日 23:45:13 Björn-Egil Dahlberg wrote:
> Yes. It's on the todo list.
> 
> I prototyped something in May but iterating over the list of maps:to_list/1
> was faster than using the iterator (though less memory intensive) so I
> scrapped it. I didn't spend an over abundance of time on it though. I will
> revisit it when there's room in the backlog.

What would be the use of having an iterator in the face of existing list operations (maps:filter/2, maps:fold/3, maps:map/2), and fast list conversions such as maps:keys/1, maps:values/1, maps:to_list/1, maps:from_list/1?

>From what I can tell "iterators" for maps already go well beyond what I had expected maps to have pre-built for them, considering their intended use. If we're missing something its maps:partition/2 to complement maps:with/2 and maps:without/2.

-Craig


More information about the erlang-questions mailing list