X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=8473faf42eeb94d29641c35e850b2e5d7a9454d7;hp=1d7f7a4ee211d07d366387753d3dab76ef84e383;hb=8100c58a929d993d2dd7022412ed6113cf97fba7;hpb=407e1a2b222459f91749500258257c203c84c287 diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 1d7f7a4..8473faf 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -42,7 +42,7 @@ module Util ( removeSpaces, -- strictness - foldl', seqList, + seqList, -- pairs unzipWith, @@ -487,16 +487,6 @@ transitiveClosure succ eq xs %* * %************************************************************************ -A strict version of foldl. - -\begin{code} -foldl' :: (a -> b -> a) -> a -> [b] -> a -foldl' f z xs = lgo z xs - where - lgo z [] = z - lgo z (x:xs) = (lgo $! (f z x)) xs -\end{code} - A combination of foldl with zip. It works with equal length lists. \begin{code}