Haskell inspired Maybe Monad/Data Type implementation in TypeScript. The base monad implementation obeys the Monad laws.
Run npm install
to get started.
Run npm test --watch
if you want to tinker with the code and re-run the tests automatically.
The examples/
directory contains some usage examples. However, most useful is to take a look at the tests.
- Mostly adequate guide to FP
- Functors, Applicatives, And Monads In Pictures
- JavaScript Monads Made Simple
- Fantasy Land Specification (Algebraic JavaScript Specification)
- Pattern Matching with TypeScript
❤ Thanks to my advisor, @swissmanu, for helping me better understand and appreciate this topic.