Minimum value in a range

bearophile bearophileHUGS at lycos.com
Tue Aug 2 06:19:35 PDT 2011


Andrej Mitrovic:

> import std.algorithm;
> 
> void main()
> {
>     auto x = min([1, 2, 3]);  // x would be 1
> }
> 
> min() isn't equipped to do this on a single range. What can I use
> instead? I haven't had my coffee yet. :)

See:
http://d.puremagic.com/issues/show_bug.cgi?id=4705

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list