smallex v0.1.7 Tpl
Tuple library.
Link to this section Summary
Link to this section Functions
Link to this function
both(arg)
Extract value on :ok or :error
Examples
iex> { :ok, "success" } |> Tpl.both
"success"
iex> { :error, "error" } |> Tpl.both
"error"
Link to this function
error(arg)
Extract value on :error
Examples
iex> { :error, "error" } |> Tpl.error
"error"
Link to this function
ok(arg)
Extract value on :ok
Examples
iex> { :ok, "success" } |> Tpl.ok
"success"