[Issue 8573] A simpler Phobos function that returns the index of the mix or max item

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Nov 26 03:44:47 PST 2016


https://issues.dlang.org/show_bug.cgi?id=8573

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #1 from Nick Treleaven <nick at geany.org> ---
Alternatively we could use std.range.enumerate with minPos. minPos could take a
unary map function like minElement does:

auto index = range.enumerate.minPos!`a.value`.front.value;

--


More information about the Digitalmars-d-bugs mailing list