monad-t
Transformers for monadic algebraic structures bridging types from various monadic libraries. All transformers are fully fantasy-land compatible. Read this article to fully understand what monad transformers are and how to fully utilize their power of transformation.
Example
const MonetEitherT: EitherT FlutureTMonetEither: FutureTEither = ;const Future = ;const Identity Either Maybe = ; ; //=> Either.Right(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1)EitherT; //=> EitherT<Maybe.Some(1) FutureTEither; //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1)
Optional dependencies
Usually developers use one or two monadic libraries in their projects. For example
developer can use monet
and fluture
in a project and it is not convenient
to install all of the optional dependencies of this package (there may be quite a lot in the future).
We recommend to use requires from a specific modules of this library so that
you won't end up with Cannot find module
error when requiring.
const EitherT = ;const FutureTEither = ; ; //=> Either.Right(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1)EitherT; //=> EitherT<Maybe.Some(1) FutureTEither; //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1); //=> FlutureTMonetEither(1)
API Documentation
0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, LATEST
Typescript support
Although monad-t
is written in ES2016, we support Typescript. When monad-t
gets
imported into Typescript project, typings are automatically imported and used.
Author
char0n (Vladimir Gorej)
https://www.linkedin.com/in/vladimirgorej/
Contributors
- Michael Kuk
- Michal Svely
- Honza Beseda