https://d.puremagic.com/issues/show_bug.cgi?id=8755


Martin Nowak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #7 from Martin Nowak <[email protected]> 2014-01-24 21:23:16 PST ---
Haskell has a function call flip for this.
http://hackage.haskell.org/package/base-4.6.0.1/docs/Prelude.html#v:flip

It turns a function taking (a, b) into one taking (b, a) instead.

In phobos this is called binaryReverseArgs.
http://dlang.org/phobos/std_functional.html#.binaryReverseArgs

So one can use
    rng.binaryReverseArgs!(reduce!fun)(seed);

Maybe we could rename it to flipArgs to make it useable?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to