toastal/either

A more complete Either for representing a structure with two types


Keywords
either, elm, sum-types, union-types
License
BSD-3-Clause
Install
elm-package install toastal/either 3.2.0

Contributors

Kyle J. Kress Michael Combs


See all contributors


Documentation

Either

A generic structure for a type with two possibilities: a Left a or a Right b.

An Either is right-biased, so most operations will be applied to the Right—although most operations are provided for Left as well.

This is similar to Result type in core , but is more generic. If you’re looking for a data type to do error handling, you should use Result instead.