jerro: > return repeat(0).map!(_ => uniform(lower, upper))(); > > repeat(0) returns the same sequence as cycle([0]) and is as fast > as it gets, since popFront does nothing and empty is an enum.
Good idea. ------------------- Dmitry Olshansky: > What's wrong with: > http://dlang.org/phobos/std_algorithm.html#count It's for a different purpose. So the count() I was proposing will need a different name. Bye, bearophile