If functions with random number generators (all shuffle functions in Array, JaggedArray, and Array2D) are used in a loop where they are called multiple times within a short time period, they yield the same result due to an identical seed.
Repro steps
for i=0 to 10 do
printfn "%A" (Array.shuffleFisherYates [|0 .. 10|])
Solution
Provide the random number generator as parameter and define it outside the loop.
Description
If functions with random number generators (all shuffle functions in Array, JaggedArray, and Array2D) are used in a loop where they are called multiple times within a short time period, they yield the same result due to an identical seed.
Repro steps
for i=0 to 10 do printfn "%A" (Array.shuffleFisherYates [|0 .. 10|])
Solution
Provide the random number generator as parameter and define it outside the loop.