[Haskell-cafe] Are all monads functions?

Yves Parès limestrael at gmail.com
Sat Dec 31 13:43:02 CET 2011


Maybe and [] have still the same meaning: they can be seen as functions:
- they represent the result(s) that might or might not have a computation
- *they have to be called/ran/executed* (wichever term you prefer) through
Data.Maybe.maybe or Data.List.foldX, so that we can extract some value out
of them.
It's just that their input is () (void). But in Haskell, the type:
() -> Maybe a
is useless, Maybe a is sufficient.

Maybe in that case "procedure" is then a better term than function.

2011/12/31 Jerzy Karczmarczuk <jerzy.karczmarczuk at unicaen.fr>

> Yves Parès :
>
>  all standard Monads are newtypes wrapping functions
>>
> What about Maybe and [] ?
>
> Jerzy Karczmarczuk
>
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111231/733ec9ab/attachment.htm>


More information about the Haskell-Cafe mailing list