Crate rsmonad

source ·
Expand description

Haskell-style monads that support >>= out of the box with Rust’s >>.

Modules

  • In general, always import this with use rsmonad::prelude::*;.

Macros

  • Implement Alternative (and its superclasses automatically) after a definition.
  • Implement Applicative (and its superclasses automatically) after a definition.
  • Implement Fold (and its superclasses automatically) after a definition.
  • Implement Functor (and its superclasses automatically) after a definition.
  • Implement ONLY Alternative (not its superclasses) after a definition.
  • Initialize an rsmonad List with each element a zero-argument closure.
  • Initialize an rsmonad List.
  • Implement Monad (and its superclasses automatically) after a definition.
  • Implement Monoid (and its superclasses automatically) after a definition.
  • Test the Alternative laws.
  • Test the Applicative laws.
  • Test the functor laws.
  • Test the monad laws.
  • Test the monoid laws.