- https://wiki.haskell.org/Monad
- https://wiki.haskell.org/Monad_laws
- https://en.m.wikipedia.org/wiki/Monad_(category_theory)
$ npm run test maybe
> [email protected] test /home/renato/codes/nodejs/lambda-ts
> jest "maybe"
PASS test/maybe.ts
Maybe monad laws test
✓ return a >>= k = k a (8 ms)
✓ m >>= return = m
✓ m >>= (\x -> k x >>= h) = (m >>= k) >>= h (1 ms)
Test Suites: 1 passed, 1 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 0.788 s, estimated 1 s
Ran all test suites matching /maybe/i