Keyword.take
You're seeing just the function
take
, go back to Keyword module for more information.
Specs
Takes all entries corresponding to the given keys and returns them in a new keyword list.
Duplicated keys are preserved in the new keyword list.
Examples
iex> Keyword.take([a: 1, b: 2, c: 3], [:a, :c, :e])
[a: 1, c: 3]
iex> Keyword.take([a: 1, b: 2, c: 3, a: 5], [:a, :c, :e])
[a: 1, c: 3, a: 5]