projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7dfe4a2
)
Give nub's complexity in the haddock docs; fixes #4086
author
Ian Lynagh
<igloo@earth.li>
Fri, 25 Jun 2010 22:20:59 +0000
(22:20 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 25 Jun 2010 22:20:59 +0000
(22:20 +0000)
Data/List.hs
patch
|
blob
|
history
diff --git
a/Data/List.hs
b/Data/List.hs
index
3c9fd26
..
87af0db
100644
(file)
--- a/
Data/List.hs
+++ b/
Data/List.hs
@@
-302,7
+302,7
@@
isSuffixOf x y = reverse x `isPrefixOf` reverse y
isInfixOf :: (Eq a) => [a] -> [a] -> Bool
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
isInfixOf :: (Eq a) => [a] -> [a] -> Bool
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
--- | The 'nub' function removes duplicate elements from a list.
+-- | /O(n^2)/. The 'nub' function removes duplicate elements from a list.
-- In particular, it keeps only the first occurrence of each element.
-- (The name 'nub' means \`essence\'.)
-- It is a special case of 'nubBy', which allows the programmer to supply
-- In particular, it keeps only the first occurrence of each element.
-- (The name 'nub' means \`essence\'.)
-- It is a special case of 'nubBy', which allows the programmer to supply