Algae v0.12.2 Algae.Either.Left View Source

Represent one side of a branching condition. In the case of representing potential error conditions, Left is traditionally associated with the error branch.

Examples

iex> %Algae.Either.Left{left: ArgumentError.exception("oopsie")}
%Algae.Either.Left{
  left: %ArgumentError{message: "oopsie"}
}

Link to this section Summary

Functions

Wrap a value in a Left struct

Link to this section Types

Link to this type t() View Source
t() :: %Algae.Either.Left{left: any}

Link to this section Functions

Wrap a value in a Left struct

Examples

iex> new("field")
%Algae.Either.Left{left: "field"}