You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this function is used in randrun, which is used in shuffle, so we get (for query arc starting at 0)
ghci> shuffle 4 $ run 4
(0>¼)|0
(¼>½)|1
(½>¾)|2
(¾>1)|3
the reason is that the implementation iterates xorwise which maps 0 to 0 (as all xor/shift generators do).
perhaps xorwise can be replaced with something from System.Random. E.g., think of mkStdGen as timeToIntSeed, then the first value already is "random" (non-zero).
this function is used in
randrun
, which is used inshuffle
, so we get (for query arc starting at 0)the reason is that the implementation iterates
xorwise
which maps 0 to 0 (as all xor/shift generators do).perhaps
xorwise
can be replaced with something from System.Random. E.g., think ofmkStdGen
astimeToIntSeed
, then the first value already is "random" (non-zero).The text was updated successfully, but these errors were encountered: