# Talk:MapReduce as a monad

### From HaskellWiki

(Difference between revisions)

(monoid) |
Julianporter (Talk | contribs) (→Monads) |
||

Line 2: | Line 2: | ||

Why is it mapreduce as a ''monad''? Map just requires Functor, and reduce sounds like `mappend`, so it'd just be MapReduce as a monoid. --[[User:Gwern|Gwern]] 20:31, 2 April 2011 (UTC) | Why is it mapreduce as a ''monad''? Map just requires Functor, and reduce sounds like `mappend`, so it'd just be MapReduce as a monoid. --[[User:Gwern|Gwern]] 20:31, 2 April 2011 (UTC) | ||

+ | |||

+ | Because the key point is that both Map and Reduce can be seen as monadic functions, and so then MapReduce is just a matter of repeated bind operations. Think of it as a generalised State monad. [[User:Julianporter|julianporter]] 21:16, 2 April 2011 (UTC) |

## Revision as of 21:16, 2 April 2011

## Monads

Why is it mapreduce as a *monad*? Map just requires Functor, and reduce sounds like `mappend`, so it'd just be MapReduce as a monoid. --Gwern 20:31, 2 April 2011 (UTC)

Because the key point is that both Map and Reduce can be seen as monadic functions, and so then MapReduce is just a matter of repeated bind operations. Think of it as a generalised State monad. julianporter 21:16, 2 April 2011 (UTC)