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

José Valim jose.valim@REDACTED
Fri Apr 8 20:48:07 CEST 2016

A pop (also called take in ets:take2) operation would be helpful. It would
return and remove a value from the map in one operation:

-spec pop(Key, Map1) -> {Value, Map2} | error

I use it quite frequently and implementing it today requires two lookups. A
BIF would be handy and be able to perform it in one step.

*José Valim*
Skype: jv.ptec
Founder and Director of R&D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160408/a01b3a65/attachment.htm>

More information about the erlang-questions mailing list