Map.split

You're seeing just the function split, go back to Map module for more information.

Specs

split(map(), [key()]) :: {map(), map()}

Takes all entries corresponding to the given keys in map and extracts them into a separate map.

Returns a tuple with the new map and the old map with removed keys.

Keys for which there are no entries in map are ignored.

Examples

iex> Map.split(%{a: 1, b: 2, c: 3}, [:a, :c, :e])
{%{a: 1, c: 3}, %{b: 2}}