Proposal: Map.with/2 and Map.without/2

46 views
Skip to first unread message

Juraj Hlista

unread,
Dec 19, 2016, 2:16:10 AM12/19/16
to elixir-lang-core
Hi,

the function Map.take/2 does the same as :maps.with/2, so I sent a PR - https://github.com/elixir-lang/elixir/pull/5575

There is also :maps.without/2 in Erlang. However, there is nothing like that in Map module (Map.untake/2 is probably a bad name). What about adding Map.with/2 and Map.without/2 functions?

Michał Muskała

unread,
Dec 19, 2016, 3:01:11 AM12/19/16
to elixir-l...@googlegroups.com
:maps.with/2 is Map.take/2, :maps.without/2 is Map.drop/2. The elixir names for those functions are consistent with the rest of Elixir's stdlib, where most collection data structures have both those functions.

Regards,
Michał Muskała.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/55089abb-dce8-4856-9c51-ee07f31464bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages