[Haskell-beginners] Beginners Digest, Vol 56, Issue 33
ky3 at atamo.com
Sun Feb 24 14:16:48 CET 2013
On Sat, Feb 23, 2013 at 10:58 PM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:
> On Sat, Feb 23, 2013 at 7:27 AM, xiao Ling <lingxiao at seas.upenn.edu>wrote:
>> How do you define a function of signature h :: M Int -> M Int -> M Int
>> so that h ( M x ) ( M y ) = M ( x + y ), but without unwrapping the value
>> from the monad?
>> there seems to be a reservation about "unwrapping the value from the
> monad", which I don't get.
It's been pointed out to me that I've completely missed OP's question
(which is really about variable names and their scope), my bad.
OP linked to sigfpe's article, which is what I should have been critiquing.
Dan has contributed a lot of good material about Haskell, and I follow his
blog closely. But the Trivial Monad article really isn't one of his best,
and he perpetuates the faulty "wrapping" metaphor that seriously hampers
I'll write later explaining why and provide a better substitute.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners