<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Yeah, and Haskell supports Linux, AND Windows. ;-)<br>
<br>
Thanks for the explanation. My shorts weren't in a knot; just said Huh?
upon reading it, thinking maybe I misunderstood something along the way.<br>
<br>
Michael<br><br><br>--- On <b>Mon, 10/5/09, Jon Fairbairn <i><jon.fairbairn@cl.cam.ac.uk></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Jon Fairbairn <jon.fairbairn@cl.cam.ac.uk><br>Subject: [Haskell-cafe] Re: Curried function terminology<br>To: haskell-cafe@haskell.org<br>Date: Monday, October 5, 2009, 5:52 AM<br><br><div class="plainMail">michael rice <<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>> writes:<br><br>> This is from Learn You A Haskell:<br>><br>> ==========<br>><br>> "Curried functions<br>><br>> Every function in Haskell officially only takes one<br>> parameter. So how is it possible that we defined and used<br>> several functions that take more than one parameter so far?<br>> Well, it's a clever trick! All the functions that accepted<br>> several parameters
so far have been curried functions. What<br>> does that mean? You'll understand it best on an example.<br>> Let's take our good friend, the max function. It looks like<br>> it takes two parameters and returns the one that's bigger.<br>> Doing max 4 5 first creates a function that takes a<br>> parameter and returns either 4 or that parameter, depending<br>> on which is bigger. Then, 5 IS APPLIED TO THAT FUNCTION and<br>> that function produces our desired result.<br>><br>> What really happens when we do multThree 3 5 9 or<br>> ((multThree 3) 5) 9? First, 3 is applied to multThree,<br>> because they're separated by a space. That creates a<br>> function that takes one parameter and returns a function. So<br>> then 5 IS APPLIED TO THAT, which creates a function that<br>> will take a parameter and multiply it by 15. 9 IS APPLIED TO<br>> THAT FUNCTION and the result is 135 or something."<br>><br>>
=======<br>><br>> The language (in CAPS) in the above two paragraphs seems to<br>> be backwards.<br><br>It is. "5 is applied to that function" should be "5 is supplied to that<br>function" (or that function is applied to 5) and so on. It's a fairly<br>common error in writing this sort of thing¹, and given that the title<br>"Learn You A Haskell" is totally ungrammatical, hardly seems surprising.<br><br>> In the first paragraph, since functions are<br>> conventionally "applied" to parameters shouldn't it read<br>> something like THE PARTIALLY APPLIED FUNCTION IS THEN<br>> APPLIED TO the 5? Or is the terminology different for<br>> Haskell, <br><br>No, but Haskell does have a lot of non-native users of English among its<br>users.<br><br><br>[1] A pet peeve of mine is "x supports y" being used backwards (as in<br>"our application supports windows Vista", which would only make sense if<br>it were something like a system tool that
stopped Vista crashing.<br><br>-- <br>Jón Fairbairn <a ymailto="mailto:Jon.Fairbairn@cl.cam.ac.uk" href="/mc/compose?to=Jon.Fairbairn@cl.cam.ac.uk">Jon.Fairbairn@cl.cam.ac.uk</a><br><a href="http://www.chaos.org.uk/%7Ejf/Stuff-I-dont-want.html" target="_blank">http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html</a> (updated 2009-01-31)<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></td></tr></table><br>