Put the complexity in the length docs. Fixes trac #3680
authorIan Lynagh <igloo@earth.li>
Sun, 21 Feb 2010 19:14:25 +0000 (19:14 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 21 Feb 2010 19:14:25 +0000 (19:14 +0000)
GHC/List.lhs

index cb8f0eb..67c651e 100644 (file)
@@ -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