[Issue 6484] New: compose can't take multi arg functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 12 13:17:28 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6484
Summary: compose can't take multi arg functions
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: ellery-newcomer at utulsa.edu
--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2011-08-12 13:17:24 PDT ---
unless only passed one function.
Of course, this doesn't make sense for any but the innermost function, e.g.
int f(int){..}
int g(int){..}
int h(int,int,int){...}
alias compose!(f,g,h) F;
assert(F(x,y,z) == f(g(h(x,y,z))));
This functionality can be trivially added by changing in composeImpl
doIt(E)(E a)
to
doIt(E...)(E a)
If conserving param modifiers is desired, it would likely take a good deal more
work.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list