This commit is contained in:
Kevin Lanni 2015-06-18 22:00:39 -07:00
parent 6f9368e628
commit 19570db1d1

View file

@ -170,6 +170,16 @@ randIter.next(); // Each exectuion gives a random value, expression is evluated
## Monad
> A Monad is a pattern to describe computations as a series of steps.
A monad is a "unit" function that wraps a value and produces the same value by way of a "bind" function and are sometimes referred to as "programmable semicolons" due to the fact that they represent chainable computations.
The simplest monad is the Identity monad. It simply wraps a value.
```js
let Identity = v => ({ bind: transform => transform(v) })
```
---
## Comonad