diff options
Diffstat (limited to 'System/Random')
-rw-r--r-- | System/Random/Shuffle.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/System/Random/Shuffle.hs b/System/Random/Shuffle.hs index 38d0a27..1df376f 100644 --- a/System/Random/Shuffle.hs +++ b/System/Random/Shuffle.hs @@ -86,9 +86,9 @@ shuffle elements = shuffleTree (buildTree elements) extractTree n (Node n' l (Leaf e)) | n + 1 == n' = (e, l) extractTree n (Node c l@(Node cl _ _) r) | n < cl = - let (e, l') = extractTree n l in (e, Node (c - 1) l' r) + let (e, l') = extractTree n l in (e, Node (c - 1) l' r) | otherwise = - let (e, r') = extractTree (n - cl) r in (e, Node (c - 1) l r') + let (e, r') = extractTree (n - cl) r in (e, Node (c - 1) l r') extractTree _ _ = panic "[extractTree] impossible" -- | Given a sequence (e1,...en) to shuffle, its length, and a random |