[Haskell-beginners] Do I understand this well
Brent Yorgey
byorgey at seas.upenn.edu
Tue Jun 28 18:45:47 CEST 2011
On Mon, Jun 27, 2011 at 03:49:46PM +0000, Roelof Wobben wrote:
>
>
>
> ________________________________
> > Date: Mon, 27 Jun 2011 16:14:28 +0100
> > Subject: Re: [Haskell-beginners] Do I understand this well
> > From: colinpauladams at gmail.com
> > To: rwobben at hotmail.com
> >
> > No.
> >
> > You are onfusing defining a function with using it.
> >
> >
> > addVectors (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
> >
> > defines the function addVectors
> >
> > (x, y) = addVectors (3.0, 4.5, -3.4, -5.6)
Shouldn't that be
(x, y) = addVectors (3.0, 4.5) (-3.4, -5.6)
?
-Brent
More information about the Beginners
mailing list