From b23d42386b6e03670674b9fe7234eb746dbd14e0 Mon Sep 17 00:00:00 2001 From: Peter Doherty Date: Fri, 26 Feb 2016 14:54:39 -0500 Subject: [PATCH 1/3] adding bind and return note to Monad entry --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index bea7af4..3cf427d 100644 --- a/readme.md +++ b/readme.md @@ -283,6 +283,9 @@ The identity value is empty array `[]` //Contrast to map ['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. Also, remember that JavaScript already has constructs called `return` and `bind`, but the functions mentioned in this context are specifically related to Monads. + --- ## Comonad From e110a1936309120f766ee1e960fb8125c40d2ca4 Mon Sep 17 00:00:00 2001 From: Peter Doherty Date: Fri, 26 Feb 2016 16:54:35 -0500 Subject: [PATCH 2/3] adding Fantasy Land spec note to Monad section --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3cf427d..2e5f1ec 100644 --- a/readme.md +++ b/readme.md @@ -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. Also, remember that JavaScript already has constructs called `return` and `bind`, but the functions mentioned in this context are specifically related to Monads. +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. --- From fd06aa7d32d1bf3705525680c7d24837d6663645 Mon Sep 17 00:00:00 2001 From: Pete Doherty Date: Sun, 28 Feb 2016 22:06:26 -0500 Subject: [PATCH 3/3] shortening Monad `bind` and `return` note --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 2e5f1ec..02a3fdd 100644 --- a/readme.md +++ b/readme.md @@ -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. ---