diff options
author | Ian Lynagh <igloo@earth.li> | 2010-06-25 22:20:59 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-06-25 22:20:59 +0000 |
commit | 039b6e19d5043a98d4da2dd36462ae7a8370c13e (patch) | |
tree | 8d0f6ea0712fb5c80531499cc4a9d28cabd3ecdf /libraries/base/Data/List.hs | |
parent | 02d543a95beb5bebad00a8f4579e0b2ada2b162b (diff) | |
download | haskell-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.hs | 2 |
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 |