A.Pair.unwrap-exclamation-mark

You're seeing just the function unwrap-exclamation-mark, go back to A.Pair module for more information.

Unwraps an idiomatic {atom, value} tuple when the atom is what is being expected. Convenient for not breaking the pipe.

Examples

iex> {:ok, 55} |> A.Pair.unwrap!(:ok)
55
iex> :error |> A.Pair.unwrap!(:ok)
** (ArgumentError) unwrap!/2 expected {:ok, _}, got: :error