Talk:Currying

message: Who calls currying Schönfinkelisation?  I see the link, but it is rather unhelpfdiaul, unless I want to buy the book.  Google has three hits for Schönfinkelisation, two of which are this page, and one of which is a PDF in French that claims it is called Schönfinkelisation in Europe.  I've spent some time in the UK, and they call it currying there.  Is it just called Schönfinkelisation in France?  Jm307 17:09, 22 August 2006 (UTC)
replies: text: Not on the French Wikipédia; they only have Curryfication. I never heard the term "Schönfinkelisation" on any continent. It may be that that term has some currency among logicians, while "Currying" is for programmers. --LambiamTalk 18:25, 22 August 2006 (UTC)
replies: text:  I forgot about this!  So, is this just one of those "we'll take it on faith" things? Jm307 20:55, 15 November 2006 (UTC)
replies: text: Googling for [Schönfinkelisation OR Schönfinkelization] gives 54 hits, many of which can be connected to the Heim & Kratzer textbook.  --LambiamTalk 00:26, 16 November 2006 (UTC)
replies: text:  Right. This is the context I learned it in (logic/semantics). My instructor was Hungarian, for what its worth.AftonLewis (talk) 17:59, 15 September 2009 (UTC)

text: The term just isn't in common use.  I've taken the liberty of currying the lead section. --Tony Sidaway 00:59, 31 August 2007 (UTC)

text: Function schönfinkeling... yeah right! If anything this mention is a bit funny, and if it's factually correct (which I'm assuming it is), then I'm for keeping it.  — Preceding unsigned comment added by 178.135.120.222 (talk) 15:33, 29 October 2011 (UTC)
replies: text: Although the question was asked in 2006, here's the answer: Currying is sometimes called Schönfinkeln in Germany. Schönfinkelisation is an englishified version of this. Cheers --08:57, 21 April 2012 (UTC)
thread_title: Schönfinkelisation

message: I think the c++ example is bogus.  It is true that plus_one(2) does get you 3, but you can't pass plus_one to functions that take a function pointer as an argument.  In other words, it's not a real function; it just looks like one when you call it in certain ways.    Maw 00:12, 3 August 2006 (UTC)
replies: text: Define "function pointer". C++ is notable in that it can do everything - it can have real functions, with a statically defined pointer, that can be pointed to by C code and template-free C++ code, and it can have abstract functor objects to which any sort of computability-theoric transformation can be applied. By fully applying all the abstractions provided by the standard library alone (not counting the countless others provided by libraries like Boost), C++ can turn into another language altogether.
It's not real currying - agreed.  It's just a class that takes an integer parameter in its constructor and has another function to add that integer to an extra parameter.. 
Dastle 05:03, 14 October 2006 (UTC)

text: If it's bogus we should not keep it. Therefore I've removed it. In general, let us agree that a language supports currying if in that language you can define some higher-order operation CURRY that, applied to some f : (X × Y) → Z, produces CURRY(f) : X → (Y → Z). The fact that in language FOO you can define both f : (X × Y) → Z and g : X → (Y → Z) does not already mean FOO supports currying.  --LambiamTalk 13:06, 12 November 2006 (UTC)
thread_title: Is the c++ example bogus?

message: Spayrard 23:35, 18 September 2006 (UTC)
replies: text: Perhaps because it was not really an example of currying? --LambiamTalk 13:08, 19 September 2006 (UTC)
thread_title: Why the Perl6 example was suppressed?

message: My understanding is that python doesn't support closures, so its presence in the list is incorrect 202.183.101.128 02:06, 7 January 2007 (UTC)
replies: text: Python introduced closures in 2001, as part of the 2.1 release;  see PEP 227.  --Piet Delport 08:53, 6 February 2007 (UTC)
thread_title:  Does Python support closures?

message: The first half of the introduction (which put me off the rest until I decided to leave a note asking WTF it's good for and decided to double-check) and most examples is gobbledygook. The ML example was the most instructive, and I don't even know ML. One possible means of clarifying things (besides getting to the point early) is to describe currying as a factory for functions. It may also be necessary to separate the math from the programming for clarity. —The preceding unsigned comment was added by 155.212.241.202 (talk) 17:16, 27 February 2007 (UTC)
replies: text: Yes, somebody please cleanup the text. The "simply put", isn't. --Belg4mit 22:30, 9 April 2007 (UTC)
thread_title:  Comprehensibility  

message: Why can we not give an easier example for currying in scheme?
Like 
;;add:number->(number->number)
;;Adding using currying 
(define (add x)
  (λ(y)
    (+ x y)))
>((add 10) 10)
20
I am new to scheme and I found the example not much helpful.
:I changed it. Comments on it please. --~rAGU
::I updated it to match its description (e.g. a general currying function).  I am not sure that this example is more readable or easier but it seems more conceptually aligned with scheme.--Jaimico 14:36, 28 March 2007 (UTC)
thread_title:  Scheme 

message: I've alphabetized the list of examples (which btw is far too long). Feel free to un-alphabetize it, but do apply /some/ order to the list. Alternative: nuke it. It's long and useless. Keep the Scheme example or such, as it does a good enough job of explaining what the concept is.
-- vstarre
:Reverted, the previous order was not random but rather functional languages (currying's origins) first, then ~alphabetic (people have been adding/moving things to break that). I personally never explicitly labeled the break as you could only say "functional/non-functional," and even then many languages cannot be clearly pigeonholed. --Belg4mit 00:40, 7 April 2007 (UTC)
replies: text: I went ahead and did it anyway --Belg4mit 22:27, 9 April 2007 (UTC)
thread_title:  Sorted list 

message: I think we have enough examples, and probably don't need more. As it is, I'm tempted to remove the Io one. How relevant of a lanuage is this?? I'd also probably remove the Java instance because of it's sheer verbosity escept for the popularity of Java, and the fact that the keen observor will then recognize that some metaphors work well in some languages, and not so much in others. --Belg4mit 22:33, 9 April 2007 (UTC)
replies: text: I changed the C# example to use LINQ - hope this is okay Pdhooper 21:32, 9 May 2007 (UTC)
thread_title:  Profusion of examples 

message: As noted in 
http://lambda-the-ultimate.org/node/2266
and
http://srfi.schemers.org/srfi-26/mail-archive/msg00000.html
Currying != Generalized Partial Application
—The preceding unsigned comment was added by 82.203.170.156 (talk) 19:23, 24 May 2007
:As the article's history shows, many people confuse the two. I was one of them until I read your links. Before that, I thought you were all being terribly pedantic.
:However, in many cases (for programming, at least), the two are trivially equivalent. Thus, the term will likely continue to be generally "misused". Perhaps it would be best to create an entry for "partial application", and add a link to the top of the currying page along the lines of "In computer programming, currying is often generalized to mean 'partial application'"?
:--manifolds 10:50, 25 May 2007 (UTC)
thread_title:  Currying != Generalized Partial Application 

message: "When viewed in a set-theoretic light, currying becomes the theorem that the set  of functions from  to A, and the set (AB)C of functions from C to the set of functions from B to A, are isomorphic."
This sentence means nothing. Two structures are isomorphic but not two sets. So the structure here is missing. -- fl
: I noticed this as well. I fixed it so it's not as confusing, but I'm still not positive the idea is properly conveyed. Wgunther (talk) 22:00, 22 July 2010 (UTC)
thread_title:  Structure missing 

message: Reference 1, the reference to the mysterious Schönfinkel, seems to lead nowhere.
Also, this article says that Curry "re-invented" the concept, presumably independently, whereas the article on Schönfinkel says "While Curry attributed the concept to Schönfinkel, it had already been used by Frege." Which is it? Mhkay (talk) 21:03, 19 August 2009 (UTC)
thread_title:  Missing Link 

message: I've just semi-rewritten the Motivation section for WP:STYLE. The code examples look a bit off to me, but I don't recognize the language so I could be wrong (and if I'm not, I wouldn't know what to change it to). Specifically, why does this language have seemingly random rules for parenthesis placement around function arguments? --Scgtrp (talk) 04:55, 28 June 2010 (UTC)
replies: text: I'm also curious what language this is. I'm going guess it's pseudocode because of how simple the function assignment is. It's not even that simple in symbolic math languages, like Mathematica. If you're going to make it pseudocode, you should probably just write it in lambda expressions which will probably be easier to read. It would be nice to see an example in some real programming language since this is otherwise a very theoretical article, but I feel like the language should be Haskell, Scheme, ML, or LISP since those are the more popular functional languages. Maybe I'm just delusional and it's a real language? Wgunther (talk) 22:24, 22 July 2010 (UTC)
replies: text:  It was pretty much Haskell, with some superfluous or even wrong pairs of parentheses. I've now reinstated a correct version of the code. --Daniel5Ko (talk) 16:31, 12 March 2011 (UTC)
thread_title:  Programming language in Motivation section 

message: According to the German Wikipedia, Currying was also invented by Gottlob Frege. Does anybody have further information? 79.230.171.86 (talk) 09:02, 31 July 2011 (UTC)
thread_title:  Also invented by Gottlob Frege? 

message: Is it (provably) true that any function can be curried?  For example, I'd expect that  y = f(a,b) =  ((a+b) / (a*b))  could not be curried.  — Preceding unsigned comment added by 87.194.171.29 (talk) 23:19, 25 October 2011 (UTC)
replies: text: Yes, at least in cases where the functions are not too limited. If I'm not mistaken, taking "function" to mean "morphism in a cartesian closed category" is exactly what is needed. In these cases, the difference is (or can be thought of) almost only in the syntax of function definitions. E.g. the curried version of your f might be specified by f(a)(b) = (a+b)/(a\cdot b). See also curry and uncurry in Haskell's standard library, which are inverses of each other. --Daniel5Ko (talk) 23:57, 25 October 2011 (UTC)
replies: text: Yes, any function that would be normally encountered by non-mathematicians can be curried. However, there are monoidal categories which are not closed, e.g. the comma category, e.g. the category of pointed spaces. 67.198.37.16 (talk) 17:47, 25 August 2016 (UTC)
thread_title:  Always possible? 

message: The eclipse compiler gives me:
Type mismatch: cannot convert from new CurryingTest.Compute<CurryingTest.Compute,Integer>(){} to CurryingTest.Compute<CurryingTest.Compute<CurryingTest.Compute<Integer,Integer>,Integer>,Integer>
Would you guys correct the example? Otherwise I'd prefer to delete it. Thx.  — Preceding unsigned comment added by BostX (talk • contribs) 10:56, 11 January 2012 (UTC)
thread_title:  The Java example has a syntax error 

message: I already know what currying is, and I *still* had trouble figuring out what the notation in our examples is supposed to mean.
"g 2 = \y -> f(2,y)"
It's in no way obvious what the "\y" and "->" symbols mean. Could someone more familiar with this idiom add an explanation of, or a link to an explanation of, these terms?
: That's Haskell notation: the \ represents a λ (lambda abstraction).
: I reworded the sentence before it to "Expressed in Haskell code, [...]", which hopefully makes the example clearer. --Piet Delport (talk) 04:14, 2 April 2012 (UTC)
replies: text: I translated the Haskell to mathematical notation and added some explanation; hopefully, it's clearer now. ehird (talk) 18:20, 2 April 2012 (UTC)
thread_title:  Confusing notation 

message: In the example in the motivation example, the function g seems to be defined in two different ways.  Near the top, it is defined as \scriptstyle g(y) = f(x, y) = 3 / 2.  Then later it is defined as \scriptstyle g(x): y \mapsto f(2, y).  So in the first case \scriptstyle g is a function of the variable \scriptstyle y that returns a value, and in the second case it is a function of the variable \scriptstyle x that returns a function.  I think.  I could be wrong, but either way it would be nice if more clarification was provided as to why these seem to be different.  — Preceding unsigned comment added by Richierocks (talk • contribs) 08:17, 13 September 2012 (UTC)
replies: text: I think I fixed this example yesterday. 67.198.37.16 (talk) 17:39, 25 August 2016 (UTC)
thread_title:  Motivation example 

message: It's great that this article has a "motivation" section. More articles should have such a section. Very few Wikipedia articles take the trouble to discuss why a thing was created, and without that context it can often be impossible for the reader to comprehend what the thing is, since the raw factual information about the thing's structure is meaningless if you don't know what the thing is for.
: Ha!  exactly what I have just written.   I should have read this first.  — Preceding unsigned comment added by 86.182.249.22 (talk) 11:57, 27 November 2014 (UTC)
replies: text: My mistake, the line about practical motivation is still present. For some reason it is the last line in the article (I admit I gave up before I got that far). I'm moving it to the motivation section. Could do with a little elaboration, I think. 81.131.48.185 (talk) 15:06, 19 March 2013 (UTC)
replies: text:  Wait, no, the line in its present incarnation is about "partial application". I'd better leave it where it is. So my point stands. 81.131.48.185 (talk) 15:08, 19 March 2013 (UTC)

text: The section name is probably not the best. It's mostly an illustrative example rather than the motivation for the concept. As it is, I don't think the example is bad; I do think it illustrates the idea of Currying. It could be improved, however. Also, there's a big fuss made the article about the difference between Currying and partial application which more than likely detracts from a layperson's understanding. The fuss is mostly isolated, but the fact it spills over to a motivating example is not really necessary.   Wgunther (talk) 18:51, 19 March 2013 (UTC)
replies: text:  Consider writing a section which describes the motivation for the concept, please. 213.122.8.41 (talk) 00:49, 27 August 2013 (UTC)
thread_title:  Mention of motivation missing in Motivation section 

message: If I understand the first example on the page correctly, it corresponds to the following JavaScript:
(function(x){ return function(y) { return y/x; } })(2)(3)
XWolfRH (talk) 18:47, 27 October 2015 (UTC)
thread_title:  JavaScript Example 

message: I just concluded a major expansion of the math section, and a re-write of the introductory section, that I hope addresses many of the issues and questions in the talk page up above. I tried hard to be very clear in the motivational example, showing all the work and the details, perhaps being a bit repetitive; but I think that's OK.  I also tried to carefully define all of the various notations and symbols used.  It could probably be tightened up just a bit more, but I'm starting to go cross-eyed, so can't quite spot these. 67.198.37.16 (talk) 21:40, 24 August 2016 (UTC)
replies: text: Thanks! —Ruud 21:46, 24 August 2016 (UTC)
thread_title:  Major expansion/re-write 

message: It is said in the article that "One writes Hom(X,Y) for the set of all functions from X to Y, and uses the notation Y^X to denote the subset of continuous functions". However isn't this the other way around? Assuming the category in which Hom is defined is the category of topological spaces Top, Hom(X,Y) denotes the continuous functions from X to Y and Y^X all possible functions from X to Y. 86.115.221.210 (talk) 19:11, 26 February 2024 (UTC)
thread_title:  Function spaces Hom