View Source Yemux.Result (Yemux v0.2.1)
Tools for Result tuples {:ok|:error, any()}
Link to this section Summary
Functions
iex(1)> and_ok({:ok, nil}, fn -> 42 end)
{:ok, 42}
iex(2)> and_ok({:error, 41}, fn -> 42 end)
{:error, 41}
Link to this section Types
@type t() :: {:ok | :error, any()}
Link to this section Functions
iex(1)> and_ok({:ok, nil}, fn -> 42 end)
{:ok, 42}
iex(2)> and_ok({:error, 41}, fn -> 42 end)
{:error, 41}