X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FList.lhs;h=67c651edc34fcaf07b9eb98718a4582f87f7c968;hb=a409f493e9d1cd9953618740c60c5c1f473393e8;hp=87a9dbd611974a21a2c07d8eaf9ce761b64b9456;hpb=688a7522048e7da103ea835d224f9e34ee1a615e;p=ghc-base.git diff --git a/GHC/List.lhs b/GHC/List.lhs index 87a9dbd..67c651e 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -108,7 +108,7 @@ null :: [a] -> Bool null [] = True null (_:_) = False --- | 'length' returns the length of a finite list as an 'Int'. +-- | /O(n)/. 'length' returns the length of a finite list as an 'Int'. -- It is an instance of the more general 'Data.List.genericLength', -- the result type of which may be any kind of number. length :: [a] -> Int @@ -647,7 +647,7 @@ zip _ _ = [] {-# INLINE [0] zipFB #-} zipFB :: ((a, b) -> c -> d) -> a -> b -> c -> d -zipFB c x y r = (x,y) `c` r +zipFB c = \x y r -> (x,y) `c` r {-# RULES "zip" [~1] forall xs ys. zip xs ys = build (\c n -> foldr2 (zipFB c) n xs ys)