summaryrefslogtreecommitdiff
path: root/libraries/base/Data/List.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-06-25 22:20:59 +0000
committerIan Lynagh <igloo@earth.li>2010-06-25 22:20:59 +0000
commit039b6e19d5043a98d4da2dd36462ae7a8370c13e (patch)
tree8d0f6ea0712fb5c80531499cc4a9d28cabd3ecdf /libraries/base/Data/List.hs
parent02d543a95beb5bebad00a8f4579e0b2ada2b162b (diff)
downloadhaskell-039b6e19d5043a98d4da2dd36462ae7a8370c13e.tar.gz
Give nub's complexity in the haddock docs; fixes #4086
Diffstat (limited to 'libraries/base/Data/List.hs')
-rw-r--r--libraries/base/Data/List.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs
index 3c9fd26595..87af0dbe8e 100644
--- a/libraries/base/Data/List.hs
+++ b/libraries/base/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)
--- | 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