Add Map.without/2 to Elixir (the erlang :maps.without/2)

Hello everyone, maybe this has been discussed already or even planned but I couldn’t find the discussion, and the search Search · ".without" · GitHub didn’t bring back any relevant result.

Why is Elixir not implementing :maps.without/2 and with Erlang -- maps which are extremely useful when working with the Map module?

Maps.without could be a of good use when implementing protocols and Map.with could be great when creating new structs for example. Right now I find myself falling back to the erlang implementation. What do you all think?

@josevalim any plan on adding such functions? I would love to open a PR in case :slight_smile:

Best,
Lorenzo S.

There’s Map.take and Map.drop already.

6 Likes