Either
A type that stores one of two values.
data Either a b
= Left a
| Right b
| Package | Type name | "Plain English" name |
|---|---|---|
| purescript-either | Either a b | Choice of 2 types |
| Usage | Values & their Usage |
|---|---|
| Used to indicate one type or a second type |
|
| Error handing (when we care about the error) |
|
API visualized:

For the corresponding "open" type, see Variant
| Package | Type name | "Plain English" name |
|---|---|---|
| purescript-variant | Variant (a :: A, b :: B) | Choice of N types |