On 23/04/12 18:56, bearophile wrote: > 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. Yes, this works nicely. Thanks very much!