thanks for the explanation. That really helped :-) writeln( generate!(() => dice(0.6, 1.4)).take(howManyTimes) ); [1, 1, 1, 1, 0](or after reading Ali's response - getting rid of rnd, and using _ )
writeln( howManyTimes.iota.map!(_ => dice(0.6, 1.4)) ); [1, 0, 1, 1, 1]They produce exactly the same thing, so I guess it comes down to personal choice now.