Category:Monads: Difference between revisions
no edit summary
(Add reference to Writer monad) |
No edit summary |
||
Line 2:
In functional programming, the [[wp:Monad_(functional_programming)|Monad]] pattern is a general solution to the problem of nesting (or 'composing') functions when the data to which they apply is enclosed in some kind of useful wrapping. It involves implementing two higher-order functions which, between them, can take care of ensuring that the nested (data-transforming) functions are not choked by being called on unexpected types of data. (Wrapped data, when they were expecting something raw and unwrapped).
The two higher-order functions which make up the monad pattern handle the details of: 1. wrapping
The two monad functions are sometimes named as follows:
|