On 2007-08-14, Dan Piponi <[EMAIL PROTECTED]> wrote:
> On 8/14/07, Sebastian Sylvan <[EMAIL PROTECTED]> wrote:
>> I like the very light weight analogy (which works for most practical
>> uses of monads) that a monadic action is a "recipe"
>
> Many introductory programming books present the idea of a program as a
> recipe. Here's a recipe for computing factorials:
>
> fact 0 = 1
> fact n = n*fact (n-1)
>
> Where do monads come in?

Playing the devil's advocate here:

Recipe is a reasonable description for imperative code ... because it's
all in the IO monad.

Not such a good mapping for functional code.

(I don't think recipe is a good analogy for, say, the List monad, reader
monads, etc.)

-- 
Aaron Denney
-><-

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to