[Haskell-cafe] Explaining monads

Malte Milatz malte at gmx-topmail.de
Tue Aug 14 15:32:24 EDT 2007


Dan Piponi, Tue, 14 Aug 2007 11:52:16 -0700:
> All functions can be viewed as recipes. (+) is a recipe. Give me some
> ingredients (two numbers) and I'll use (+) to give you back their sum.

(+) is not a recipe, it is a chef. On the other hand, 
(return 5 :: State Integer) is a recipe. You need a
chef, namely runState, to get your meal.

Oh my, imagery can be so crazy.

Malte


More information about the Haskell-Cafe mailing list