Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  A post about Currying and Partial application (Petar Radosevic)
   2. Re:  A post about Currying and Partial    application (Peter Hall)


----------------------------------------------------------------------

Message: 1
Date: Fri, 30 Sep 2011 15:59:27 +0200
From: Petar Radosevic <pe...@wunki.org>
Subject: [Haskell-beginners] A post about Currying and Partial
        application
To: beginners@haskell.org
Message-ID: <20110930135927.GA1812@wunki-mac-pro.local>
Content-Type: text/plain; charset="utf-8"

Hi,

Like most here I'm also learning the beautiful language called Haskell
and arrived at the subject of Currying. To see if I really understood
the concept, I decided to write a blog post about it.

http://s3.wunki.org/posts/2011-09-30-curry-and-its-partial-application.html

I hope it helps some of the beginners here. Please take a look at it
and let me know if I'm wrong or if I missed something.

Thank you!
-- 
Petar Rado?evi?, Programmer
wunki.org | @wunki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Signature of Petar Radosevic
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110930/ba6e49a4/attachment-0001.pgp>

------------------------------

Message: 2
Date: Sat, 1 Oct 2011 10:49:31 +0100
From: Peter Hall <peter.h...@memorphic.com>
Subject: Re: [Haskell-beginners] A post about Currying and Partial
        application
To: beginners@haskell.org
Message-ID:
        <CAA6hAk7CNCf=qzsdwxkjmv98i+xuf+2xombzjyz3z8-4ze_...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

I think this sentence isn't right:

"Curried functions are functions that only take one parameter."

The way I understand it, a non-curried function takes only one
parameter. Currying is syntactic sugar so you don't have to use
higher-order functions every time you want multiple parameters.

Without currying, if you wanted a function like:

    f a b c = 2 * a + b - c

, you'd have to write it something like:

  f a = f1
      where f1 b = f2
          where f2 c = 2 * a + b - c

or

   f a = (\b -> (\c ->  2*a + b -c))


Peter


On Fri, Sep 30, 2011 at 2:59 PM, Petar Radosevic <pe...@wunki.org> wrote:
> Hi,
>
> Like most here I'm also learning the beautiful language called Haskell
> and arrived at the subject of Currying. To see if I really understood
> the concept, I decided to write a blog post about it.
>
> http://s3.wunki.org/posts/2011-09-30-curry-and-its-partial-application.html
>
> I hope it helps some of the beginners here. Please take a look at it
> and let me know if I'm wrong or if I missed something.
>
> Thank you!
> --
> Petar Rado?evi?, Programmer
> wunki.org | @wunki
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>



------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 40, Issue 1
****************************************

Reply via email to