ark v0.1.0 Ark.Wok
Link to this section Summary
Link to this section Functions
Link to this function
ok(err)
Wrapping ok.
Wraps the passed value in an :ok
tuple if :
- The value is not already wrapped
- It is not an
{:error, v}
tuple - The value is not the single atom
:ok
Link to this function
ok?(arg1)
Questionning ok.
Returns true if the value is an {:ok, val}
tuple or the single atom :ok.
Returns false otherwise.
Link to this function
uok(val)
Unwrapping ok.
Unwraps an {:ok, val}
tuple, giving only the value, returning anything else
as-is. Does not unwrap :error
tuples.
Link to this function
uok!(other)
Unwrapping ok with raise.
Unwraps an {:ok, val}
tuple, giving only the value, or returns the single
:ok
atom as-is. Raises with any other value.
Link to this function
wok(it)
ẁok
is an alias of wrapping function :ok
.