   ## Accessors
 
   @doc """
-  Accesses the given key in a map/struct.
-
-  Uses the default value if the key does not exist
-  or if the value being accessed is `nil`.
+  Returns a function that accesses the given key in a map/struct.
+
+  The returned function is typically passed as an accessor to `Kernel.get_in/2`,
+  `Kernel.get_and_update_in/3`, and friends.
+
+  Uses the default value if the key does not exist or if the value being
+  accessed is `nil`.
 
   ## Examples
 

  @doc """
  Invoked to "pop" the value under `key` out of the given term.

  The implementation should remove `key` from the given `term` and return a
  `{value, new_term}` tuple where `value` is the value that was under `key` and
  `new_term` is `term` without `key`.

  See the implementations for `Map.pop/3` or `Keyword.pop/3` for more examples.
  """

      raise_undefined_behaviour e, struct, {^struct, :fetch, [^container, ^key], _}
  end

  def fetch(map, key) when is_map(map) do
    Map.fetch(map, key)
  end

  def fetch(list, key) when is_list(list) and is_atom(key) do
    Keyword.fetch(list, key)
  end

  def fetch(list, key) when is_list(list) do
