Map.take is not a good name

You mean you would expect it to do something like this?

Enum.map(keys, fn key ->
   case Map.fetch(map, key) do
     {:ok, value} -> {key, value}
     _ -> nil
   end
 end)

Perhaps, but I think that the name take is not obviously indicating one or the other case, so I personally don’t think it’s a bad name. Maybe it could have been called Map.pick, just to differentiate it from Enum.take which takes a number of elements, but renaming it now would have much bigger disadvantages than advantages in my opinion.

2 Likes