shortening Monad bind and return note

This commit is contained in:
Pete Doherty 2016-02-28 22:06:26 -05:00
parent e110a19363
commit fd06aa7d32

View file

@ -284,7 +284,7 @@ The identity value is empty array `[]`
['cat,dog','fish,bird'].map(a => a.split(',')) // [['cat','dog'], ['fish','bird']]
```
You may also see `of` and `chain` referred to as `return` and `bind` in languages which provide Monad-like constructs as part of their standard library (e.g. Haskell, F#), [the Monad Wikipedia entry](https://en.wikipedia.org/wiki/Monad_%28functional_programming%29) and other literature. Remember that JavaScript already has constructs called `return` and `bind`, but the functions mentioned in this context are specifically related to Monads. It's also important to note that `return` and `bind` are not part of the [Fantasy Land spec](https://github.com/fantasyland/fantasy-land) and are mentioned here for the sake of people interested in learning more about Monads on their own.
You may also see `of` and `chain` referred to as `return` and `bind` (not be confused with the JS keyword/function...) in languages which provide Monad-like constructs as part of their standard library (e.g. Haskell, F#), on [Wikipedia](https://en.wikipedia.org/wiki/Monad_%28functional_programming%29) and in other literature. It's also important to note that `return` and `bind` are not part of the [Fantasy Land spec](https://github.com/fantasyland/fantasy-land) and are mentioned here only for the sake of people interested in learning more about Monads.
---