OkThen.Result.none_retag

You're seeing just the function none_retag, go back to OkThen.Result module for more information.
Link to this function

none_retag(result, new_tag)

Specs

none_retag(result_input(), new_tag) :: new_tag | {new_tag, any()}
when new_tag: atom()

If result is tagged :none, replaces the tag with new_tag.

Equivalent to tagged_retag(result, :none, new_tag). See tagged_retag/3.

Examples

iex> :none |> Result.none_retag(:ok)
:ok

iex> :error |> Result.none_retag(:ok)
:error

iex> :ok |> Result.none_retag(:ok)
:ok

iex> :none |> Result.none_retag("string")
** (ArgumentError) Expected atom as new tag, got: "string".

iex> "bare value" |> Result.none_retag(:error)
"bare value"