how to get top N distinct elements from range?

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


Simpler:


import std.stdio, std.range, std.algorithm;

void main() {
     iota(5).map!((x) {
         write("*");
         return x;
     }).filter!(_ => true).array;
}


More information about the Digitalmars-d-learn mailing list