Skip to content

API Reference

All types live under the Monads namespace. This reference documents the public surface of each type. For task-oriented explanations, see the Guide.

Type hierarchy

Functor(T)
└── Monad(T)
    ├── Maybe(T)        — Just(T) | Nothing(T)
    ├── Either(E, T)    — Right(E, T) | Left(E, T) | LeftException(T)
    └── List(T)

Try(T) and Task(T) are standalone types that convert into Maybe or Either rather than being chained directly.

Reference pages

  • Functor — the fmap base abstraction.
  • Monad — adds bind, |, and >>.
  • MaybeJust and Nothing.
  • EitherRight, Left, and LeftException.
  • List — an Array as a monad.
  • Try — capture exceptions into a monad.
  • Task — a Try on a fiber.
  • Errors — exceptions raised by the library.

Released under the MIT License.