Data.Either

The Data.Either type represents values with two possibilities: left(a) or right(b).

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the left/1 constructor is used to hold an error value and the right/1 constructor is used to hold a correct value (mnemonic: “right” also means “correct”).

Summary

Functions

The left (“error”) constructor

The right (“correct”) constructor

Types

t :: %Data.Either{left: term, right: term}

Functions

left(v)

Specs

left(term) :: t

The left (“error”) constructor.

right(v)

Specs

right(term) :: t

The right (“correct”) constructor.