[erlang-questions] Maps branch and disclaimers

Chris King colanderman@REDACTED
Wed Oct 30 14:26:57 CET 2013

On Wed, 30 Oct 2013 08:40:44 -0400, Robert Virding  
<robert.virding@REDACTED> wrote:

> - I need functions:
> first(Map) -> {Key,Value} | error.
> last(Map) -> {Key,Value} | error.
> next(Key, Map) -> {Key1,Value} | error.
> prev(Key, Map) -> {Key1,Value} | error.
> for stepping through maps. Have them return both key and value in one go  
> as it saves an explicit fetch and the extra cost is >minimal.

I don't get this use case.  Why do you need syntax support for a key-value  
map where you don't know a priori what the keys and values are?  Why don't  
dict() and friends suffice?

To me this is akin to iterating through a record/tuple.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131030/b368bbfc/attachment.htm>

More information about the erlang-questions mailing list