Map

pop/3

pop(map, key, default \\ nil)

Returns and removes the value associated with key in map.

If key is present in map with value value, {value, new_map} is returned where new_map is the result of removing key from map.

If key is not present in map, {default, map} is returned.