Map.pop_lazy/3

defmodule Map do
  def pop_lazy(map, key, fun)
end

Lazily 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, {b, map} is returned, where b is the result of applying fun.