On Wed, Aug 28, 2013 at 06:18:01PM +0200, Jesse Phillips wrote: > On Tuesday, 27 August 2013 at 12:59:19 UTC, Jason den Dulk wrote: > >Hi > > > >This code > > > > foreach (j; 0..5) > > writeln(rndGen().take(5)); > > writeln(uniform(0, 1024)); > > foreach (j; 0..5) > > writeln(rndGen().take(5)); > > What monarch said, though std.range.refRange() may be of interest: > > http://dlang.org/phobos/std_range.html#.refRange
That currently doesn't work too well if you use any RNG members other than the standard range API, due to: http://d.puremagic.com/issues/show_bug.cgi?id=10888 T -- Ignorance is bliss... until you suffer the consequences!