Gmail Calendar Documents Web Reader more »
Recently Visited Groups | Help | Sign in
Google Groups Home
the conceptual and computational similarity of sum, (+) and concat, (++)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
The Quiet Center  
View profile  
 More options Mar 11, 8:11 am
Newsgroups: comp.lang.haskell
From: The Quiet Center <thequietcen...@gmail.com>
Date: Thu, 11 Mar 2010 05:11:14 -0800 (PST)
Local: Thurs, Mar 11 2010 8:11 am
Subject: the conceptual and computational similarity of sum, (+) and concat, (++)
I just find it noteworthy that sum and (+) do roughly the same thing
and that (+) could be implemented in terms of sum:

(+) a b = sum [a,b]

Another way to put it is that sum does it work by folding (+)

I was talking with someone in #haskell that felt these related
functions really should have different names.

And I suppose the culture of (+) comes from math and binary addition.
And in english we say "sum a list", so it does seem that choosing
widely different names for computationally and conceptually similar
functions is indeed valid.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "the conceptual and computational similarity of sum, (+) and concat, ?(++)" by Philip Armstrong
Philip Armstrong  
View profile  
 More options Mar 11, 9:23 am
Newsgroups: comp.lang.haskell
From: Philip Armstrong <p...@kantaka.co.uk>
Date: Thu, 11 Mar 2010 14:23:05 +0000 (GMT)
Local: Thurs, Mar 11 2010 9:23 am
Subject: Re: the conceptual and computational similarity of sum, (+) and concat, ?(++)
The Quiet Center <thequietcen...@gmail.com> wrote:

> I just find it noteworthy that sum and (+) do roughly the same thing
> and that (+) could be implemented in terms of sum:

> (+) a b = sum [a,b]

> Another way to put it is that sum does it work by folding (+)

+ in most LISPs is in fact sum:

> (+ 1 2)
3
> (+ 1 2 3)

6

Which given the syntax makes perfect sense.

Phil

--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google