a random access range that has the length property defined
(optional) random number generator to use; if not specified, defaults to rndGen
A single random element drawn from the range. If it can, it will return a ref to the range element, otherwise it will return a copy.
auto rnd = MinstdRand0(42); auto elem = [1, 2, 3, 4, 5].choice(rnd); version (D_LP64) // https://issues.dlang.org/show_bug.cgi?id=15147 assert(elem == 3);
Returns a random, uniformly chosen, element e from the supplied Range range. If no random number generator is passed, the default rndGen is used.