toastal/either

Either for representing a structure with two types


Keywords
elm, result, either, union-types, sum-types
License
Apache-2.0
Install
elm-package install toastal/either 3.4.0

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 many 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.


Project & Community Notes

This project is regrettably available on GitHub. The Elm community has tied itself to the closed-source, Microsoft-owned code forge of GitHub for package registry and identity. This does not protect the privacy or freedom of its community members.


License

This project is licensed under Apache License 2.0 - LICENSE file for details.

Funding

If you want to make a small contribution to the maintanence of this & other projects

  • Liberapay
  • Bitcoin: 39nLVxrXPnD772dEqWFwfZZbfTv5BvV89y (verified on Keybase)
  • Zcash: t1a9pD1D2SDTTd7dbc15KnKsyYXtGcjHuZZ (verified on Keybase)