Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Beginners Digest, Vol 56, Issue 33 (Kim-Ee Yeoh)
2. Re: First code review (Brent Yorgey)
3. Re: First code review (Erik de Castro Lopo)
----------------------------------------------------------------------
Message: 1
Date: Sun, 24 Feb 2013 20:16:48 +0700
From: Kim-Ee Yeoh <[email protected]>
Subject: Re: [Haskell-beginners] Beginners Digest, Vol 56, Issue 33
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Message-ID:
<CAPY+ZdS=6idhnehu+qsl2soor_sgvhsx9uly0wvargtgqft...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Sat, Feb 23, 2013 at 10:58 PM, Kim-Ee Yeoh <[email protected]> wrote:
> On Sat, Feb 23, 2013 at 7:27 AM, xiao Ling <[email protected]>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
Haskell productivity.
I'll write later explaining why and provide a better substitute.
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130224/81343b3b/attachment-0001.htm>
------------------------------
Message: 2
Date: Sun, 24 Feb 2013 09:31:44 -0500
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] First code review
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Sun, Feb 24, 2013 at 06:29:22PM +1100, Erik de Castro Lopo wrote:
> Brent Yorgey wrote:
>
> > Since both the Grid and Heuristic values are created once and
> > then used in a read-only fasion, this is a perfect opportunity to use
> > arrays: see
> >
> >
> > http://hackage.haskell.org/packages/archive/array/latest/doc/html/Data-Array.html
> >
> > Using read-only arrays is really quite simple (as opposed to
> > read/write arrays which require a monad of some sort).
>
> Brent, out of curiosity, why Array instead of Data.Vector?
No reason other than that I'm more familiar with Array. Upon inspection of
Data.Vector
it looks like that would indeed be a better choice.
-Brent
------------------------------
Message: 3
Date: Mon, 25 Feb 2013 09:09:32 +1100
From: Erik de Castro Lopo <[email protected]>
Subject: Re: [Haskell-beginners] First code review
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII
Brent Yorgey wrote:
> > Brent, out of curiosity, why Array instead of Data.Vector?
>
> No reason other than that I'm more familiar with Array. Upon inspection of
> Data.Vector
> it looks like that would indeed be a better choice.
Thank Brent. That confirms my own choice :-).
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 56, Issue 41
*****************************************