[Issue 13940] std.algorithm.argMin
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jan 5 13:59:39 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13940
--- Comment #3 from bearophile_hugs at eml.cc ---
(In reply to Peter Alexander from comment #2)
> In the reduce, the max!abs would be called n - 1 times, and each call to
> max!abs(a, b) would involve two calls to abs, so 2(n - 1) calls total, not n
> (unless I've misunderstood somewhere).
Thank you for your answer (that should go also in Issue 4705 ). If you are
right, then:
- I want both functions for "min with key" and "max with key" (putting only one
of them in Phobos sucks);
- I prefer an unary function instead of a binary function. When you get used to
unary functions they are much more handy.
So I guess you can call call them keyMax and keyMin.
--
More information about the Digitalmars-d-bugs
mailing list