       iex> Map.put(%{a: 1, b: 2}, :a, 3)
       %{a: 3, b: 2}
 
+  Inlined by the compiler.
   """
   @spec put(map, key, value) :: map
   def put(map, key, value) do

  @spec replace(map, key, value) :: map
  def replace(map, key, value) do
    case has_key?(map, key) do
      true -> :maps.update(key, value, map)
      false -> map
    end
  end


  @type key :: any
  @type value :: any
  @compile {:inline, fetch: 2, put: 3, delete: 2, has_key?: 2, replace!: 3}

  @doc """
  Returns all keys from `map`.
