Prelude.RandomAdditional random functions.
include module type of struct include Stdlib.Random endmodule Array : sig ... endRandom functions for arrays.
(shuffle ?state list) returns a list, via a Fisher–Yates shuffle, with the same contents as list but in a random order; tail-recursive, O(n).
N.B. this convenience function uses Array.shuffle and hence list makes a round-trip to and from a temporary array. To avoid this cost, you should do your own type conversion whenever possible.