Category:Monads: Difference between revisions

Content added Content deleted
(Brief gloss on role of IO and State monads in the context of pure function applications)
No edit summary
Line 23: Line 23:
:Nests partial functions which return their output in a wrapper that includes a boolean flag – indicating whether or not the input value was legal. Composition of these functions avoids the need for exception handling when an illegal value is encountered somewhere along the chain of function applications.
:Nests partial functions which return their output in a wrapper that includes a boolean flag – indicating whether or not the input value was legal. Composition of these functions avoids the need for exception handling when an illegal value is encountered somewhere along the chain of function applications.
;the List monad
;the List monad
:Nests functions whose outputs consist of ranges of possible values, rather than single values. Composing these functions yields cartesian products, and a convenient encoding of set comprehensions.
:Nests functions which output ranges of possible values, rather than single values. Composing these functions yields cartesian products, and a convenient encoding of set comprehensions.