www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6484] New: compose can't take multi arg functions

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: ellery-newcomer utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer 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: -------
Aug 12 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6484



--- Comment #1 from github-bugzilla puremagic.com 2012-08-27 01:34:27 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/aa40b3b47d64dbf55bd559f113148925ced61ccf
Merge pull request #753 from mylodon/enh6484

fix issue 6484

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 27 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6484


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-02-05
13:19:21 PST ---
(In reply to comment #1)
 Commit pushed to master at https://github.com/D-Programming-Language/phobos
 
 https://github.com/D-Programming-Language/phobos/commit/aa40b3b47d64dbf55bd559f113148925ced61ccf
 Merge pull request #753 from mylodon/enh6484
 
 fix issue 6484

Note: this pull is unrelated to this bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 05 2013