projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92f98e0
)
Put the complexity in the length docs. Fixes trac #3680
author
Ian Lynagh
<igloo@earth.li>
Sun, 21 Feb 2010 19:14:25 +0000
(19:14 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sun, 21 Feb 2010 19:14:25 +0000
(19:14 +0000)
GHC/List.lhs
patch
|
blob
|
history
diff --git
a/GHC/List.lhs
b/GHC/List.lhs
index
cb8f0eb
..
67c651e
100644
(file)
--- 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