diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index b4b6ebc4429f589410cda3b4b6d4209b84ae6f32..001af57825c4c353becf617d447367b8cff01baa 100644 --- a/libraries/base/Data/OldList.hs +++ b/libraries/base/Data/OldList.hs @@ -1548,13 +1548,13 @@ permutations xs0 = xs0 : perms xs0 [] -- | @perms ts is@ is equivalent to -- -- > concat - -- > [ interleave {(ts!!n)} {(drop (n+1)} ts) xs [] + -- > [ interleave {(ts!!n)} {(drop (n+1) ts)} xs [] -- > | n <- [0..length ts - 1] -- > , xs <- permutations (reverse (take n ts) ++ is) -- > ] -- - -- @{(ts!!n)}@ and @{(drop (n+1)}@ denote the values of variables @t@ and @ts@ which - -- appear free in the definition of @interleave@ and @interleave'@. + -- @{(ts!!n)}@ and @{(drop (n+1) ts)}@ denote the values of variables @t@ and @ts@ + -- when they appear free in the definition of @interleave@ and @interleave'@. perms :: forall a. [a] -> [a] -> [[a]] perms [] _ = [] perms (t:ts) is = foldr interleave (perms ts (t:is)) (permutations is) @@ -1570,7 +1570,7 @@ permutations xs0 = xs0 : perms xs0 [] interleave :: [a] -> [[a]] -> [[a]] interleave xs r = let (_,zs) = interleave' id xs r in zs - -- @interleave' f ys r@ is equivalent to + -- @interleave' {t} {ts} f ys r@ is equivalent to -- -- > ( ys ++ ts -- > , [ f (insertAt n t ys ++ ts) | n <- [0..length ys - 1] ] ++ r