Re: [Haskell-cafe] Re: Curried function terminology
On Mon, Oct 5, 2009 at 11:52 AM, Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote: [1] A pet peeve of mine is x supports y being used backwards (as in our application supports windows Vista, which would only make sense if it were something like a system tool that stopped Vista crashing. (Not a native English speaker here) How would you say x works well with y ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Curried function terminology
David Virebayre dav.vire+hask...@gmail.com writes: On Mon, Oct 5, 2009 at 11:52 AM, Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote: [1] A pet peeve of mine is x supports y being used backwards (as in our application supports windows Vista, which would only make sense if it were something like a system tool that stopped Vista crashing. (Not a native English speaker here) How would you say x works well with y ? I think I would say x works well with y. There's no reason to abuse support (which carries an implication of one thing being on top of another) for this. -- Jón Fairbairn jon.fairba...@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Curried function terminology
michael rice nowg...@yahoo.com writes: This is from Learn You A Haskell: == Curried functions Every function in Haskell officially only takes one parameter. So how is it possible that we defined and used several functions that take more than one parameter so far? Well, it's a clever trick! All the functions that accepted several parameters so far have been curried functions. What does that mean? You'll understand it best on an example. Let's take our good friend, the max function. It looks like it takes two parameters and returns the one that's bigger. Doing max 4 5 first creates a function that takes a parameter and returns either 4 or that parameter, depending on which is bigger. Then, 5 IS APPLIED TO THAT FUNCTION and that function produces our desired result. What really happens when we do multThree 3 5 9 or ((multThree 3) 5) 9? First, 3 is applied to multThree, because they're separated by a space. That creates a function that takes one parameter and returns a function. So then 5 IS APPLIED TO THAT, which creates a function that will take a parameter and multiply it by 15. 9 IS APPLIED TO THAT FUNCTION and the result is 135 or something. === The language (in CAPS) in the above two paragraphs seems to be backwards. It is. 5 is applied to that function should be 5 is supplied to that function (or that function is applied to 5) and so on. It's a fairly common error in writing this sort of thing¹, and given that the title Learn You A Haskell is totally ungrammatical, hardly seems surprising. In the first paragraph, since functions are conventionally applied to parameters shouldn't it read something like THE PARTIALLY APPLIED FUNCTION IS THEN APPLIED TO the 5? Or is the terminology different for Haskell, No, but Haskell does have a lot of non-native users of English among its users. [1] A pet peeve of mine is x supports y being used backwards (as in our application supports windows Vista, which would only make sense if it were something like a system tool that stopped Vista crashing. -- Jón Fairbairn jon.fairba...@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Curried function terminology
Am Montag 05 Oktober 2009 11:52:17 schrieb Jon Fairbairn: michael rice nowg...@yahoo.com writes: This is from Learn You A Haskell: snip The language (in CAPS) in the above two paragraphs seems to be backwards. It is. 5 is applied to that function should be 5 is supplied to that function (or that function is applied to 5) and so on. It's a fairly common error in writing this sort of thing¹, and given that the title Learn You A Haskell is totally ungrammatical, hardly seems surprising. In the first paragraph, since functions are conventionally applied to parameters shouldn't it read something like THE PARTIALLY APPLIED FUNCTION IS THEN APPLIED TO the 5? Or is the terminology different for Haskell, That would be correct but awkward. IMO it would be better to say that 5 is then supplied (or fed) to (the partially applied function). I tend to feed arguments to functions if I don't want to apply a function to an argument. No, but Haskell does have a lot of non-native users of English among its users. I'm not sure that's relevant for this kind of error. I think it's more a lack of familiarity with mathematical terminology. [1] A pet peeve of mine is x supports y being used backwards (as in our application supports windows Vista, which would only make sense if it were something like a system tool that stopped Vista crashing. Or if Microsoft uses the profits from App X to compensate deficits incurred by Vista. Or if the application sports banners Vista is great! Get you a Vista today! :D But seriously, yes, it's annoying. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Curried function terminology
Yeah, and Haskell supports Linux, AND Windows. ;-) 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. Michael --- On Mon, 10/5/09, Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote: From: Jon Fairbairn jon.fairba...@cl.cam.ac.uk Subject: [Haskell-cafe] Re: Curried function terminology To: haskell-cafe@haskell.org Date: Monday, October 5, 2009, 5:52 AM michael rice nowg...@yahoo.com writes: This is from Learn You A Haskell: == Curried functions Every function in Haskell officially only takes one parameter. So how is it possible that we defined and used several functions that take more than one parameter so far? Well, it's a clever trick! All the functions that accepted several parameters so far have been curried functions. What does that mean? You'll understand it best on an example. Let's take our good friend, the max function. It looks like it takes two parameters and returns the one that's bigger. Doing max 4 5 first creates a function that takes a parameter and returns either 4 or that parameter, depending on which is bigger. Then, 5 IS APPLIED TO THAT FUNCTION and that function produces our desired result. What really happens when we do multThree 3 5 9 or ((multThree 3) 5) 9? First, 3 is applied to multThree, because they're separated by a space. That creates a function that takes one parameter and returns a function. So then 5 IS APPLIED TO THAT, which creates a function that will take a parameter and multiply it by 15. 9 IS APPLIED TO THAT FUNCTION and the result is 135 or something. === The language (in CAPS) in the above two paragraphs seems to be backwards. It is. 5 is applied to that function should be 5 is supplied to that function (or that function is applied to 5) and so on. It's a fairly common error in writing this sort of thing¹, and given that the title Learn You A Haskell is totally ungrammatical, hardly seems surprising. In the first paragraph, since functions are conventionally applied to parameters shouldn't it read something like THE PARTIALLY APPLIED FUNCTION IS THEN APPLIED TO the 5? Or is the terminology different for Haskell, No, but Haskell does have a lot of non-native users of English among its users. [1] A pet peeve of mine is x supports y being used backwards (as in our application supports windows Vista, which would only make sense if it were something like a system tool that stopped Vista crashing. -- Jón Fairbairn jon.fairba...@cl.cam.ac.uk http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html (updated 2009-01-31) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe