Keyword.split
You're seeing just the function
split
, go back to Keyword module for more information.
Specs
Takes all entries corresponding to the given keys and extracts them into a separate keyword list.
Returns a tuple with the new list and the old list with removed keys.
Keys for which there are no entries in the keyword list are ignored.
Entries with duplicated keys end up in the same keyword list.
Examples
iex> Keyword.split([a: 1, b: 2, c: 3], [:a, :c, :e])
{[a: 1, c: 3], [b: 2]}
iex> Keyword.split([a: 1, b: 2, c: 3, a: 4], [:a, :c, :e])
{[a: 1, c: 3, a: 4], [b: 2]}