Keyword.fetch
You're seeing just the function
fetch
, go back to Keyword module for more information.
Specs
Fetches the value for a specific key
and returns it in a tuple.
If the key
does not exist, returns :error
.
Examples
iex> Keyword.fetch([a: 1], :a)
{:ok, 1}
iex> Keyword.fetch([a: 1], :b)
:error