Map.fetch/2
defmodule Map do
def fetch(map, key)
end
Fetches the value for a specific key in the given map by returning {:ok, value}.
If map doesn’t contain key, :error is returned.
defmodule Map do
def fetch(map, key)
end
Fetches the value for a specific key in the given map by returning {:ok, value}.
If map doesn’t contain key, :error is returned.