17 May
2001
17 May
'01
1:41 a.m.
At 2001-05-17 01:25, Mads Skagen wrote:
My question is why are monads necessary in the language ?
Is it not possible to construct the features provided by Monads using basic functional constructs ?
Monads themselves are made purely out of basic functional constructs.
What do I gain using Monads ?
They happen to be a very convenient pattern. Mostly they're used to model imperative actions: while a purely functional language cannot actually execute actions as part of its evaluation, it can compose them, along the lines of "AB is the action of doing A, and then doing B with its result". Monads happen to be a useful pattern for such things. -- Ashley Yakeley, Seattle WA