A.Pair.wrap
You're seeing just the function
wrap
, go back to A.Pair module for more information.
Wraps the value
as an idiomatic {atom, value}
tuple.
Convenient for not breaking the pipe.
Examples
iex> 55 |> A.Pair.wrap(:ok)
{:ok, 55}
iex> %{a: 5} |> Map.update!(:a, & &1 + 1) |> A.Pair.wrap(:no_reply)
{:no_reply, %{a: 6}}