how to get top N distinct elements from range?

bearophile bearophileHUGS at lycos.com
Fri Mar 8 15:51:44 PST 2013


Andrea Fontana:

> Here the answer:
>
> auto r=iota(100).map!((x) => uniform(0,10))();
> writeln(r.front," ", r.front, " ", r.front, " ", r.front);

I think that's not the answer. I think the answer is a bug in 
filter().

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list