Bug 8798 – Tuple curry example not really curry

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-10T19:33:00Z
Last change time
2014-04-23T20:01:24Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
Jesse.K.Phillips+D

Comments

Comment #0 by Jesse.K.Phillips+D — 2012-10-10T19:33:11Z
Per doc comment: http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Tuples Actually they call it "partial function application" Currying is something else often mistaken for partial evaluation. Currying is treating a function of N args that returns Ret func: (Arg1,Arg2,Arg3) -> Ret as a function that does partial application of arguments "to the max" func: Arg1 -> (Arg2 -> (Arg3 -> Ret)) That's a function that takes an Arg1 and returns (a function that takes an Arg2 and returns (a function that takes an Arg3 and returns a Ret)) So the call func a b c is treated as (((func a) b ) c) with currying. In ML for instance, all functions are curried by default (but you can sort of override the behavior by declaring your function to take a tuple as a single argument). Python has a partial application library that was originally called 'curry' until the functional folks shot it down as a misnomer. Now it's called 'partial'. Python Partial Function Application http://www.python.org/dev/peps/pep-0309/
Comment #1 by andrej.mitrovich — 2014-04-23T10:44:00Z
Comment #2 by github-bugzilla — 2014-04-23T20:01:23Z
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/a4c735929088535cd7cb0feb41181649e1ef289b Fix Issue 8798 - Replace the outdated curry example which was an example of a partial function application. https://github.com/D-Programming-Language/dlang.org/commit/2329708ab38bf75bfd6126e70dce17bb43954a67 Merge pull request #558 from AndrejMitrovic/Fix8798 Issue 8798 - Replace outdated curry example