[Haskell-cafe] Explaining monads

Sebastian Sylvan sebastian.sylvan at gmail.com
Tue Aug 14 15:30:55 EDT 2007


On 14/08/07, Malte Milatz <malte at gmx-topmail.de> wrote:
> 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.

Thank you! That does make sense.

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862


More information about the Haskell-Cafe mailing list