Greg Ewing wrote: > But isn't that just as wrong as the first version? It still seems > >to be describing partial application, not currying as you defined >it above. Maybe it should say > > Function currying is the process of transforming a function that > takes n arguments into a function that takes one argument and > returns another function (itself also curried, if n > 2) that > takes the remaining n-1 arguments. > > > Yes, that's currying alright, which PEP 309 does in no way describe. Hmm. OK, there is way too much imprecise thinking behind that PEP. Sorry. I did originally describe it as a closure in the first version, then someone corrected me about that too. I'll give the wording some more thought, but the problem I have is that to be useful, the class or function that implements it has to have a wieldy and clear name. Myself, I wouldn't like to use PartiallyApply(fn,*args,**kw). Quick unscientific name poll. Who likes... * curry() * closure() * partial() * partial_apply() * delayed() * other ? Thanks for your thoughts, folks. Peter Harris scav at blueyonder, co, uk
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4