Skip to content

Commit 1d35202

Browse files
committed
Merge pull request hemanth#24 from ethagnawl/master
adding `bind` and `return` note to Monad entry
2 parents cd3c2d6 + fd06aa7 commit 1d35202

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ The identity value is empty array `[]`
283283
//Contrast to map
284284
['cat,dog','fish,bird'].map(a => a.split(',')) // [['cat','dog'], ['fish','bird']]
285285
```
286+
287+
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.
288+
286289
---
287290

288291
## Comonad

0 commit comments

Comments
 (0)