From 039b6e19d5043a98d4da2dd36462ae7a8370c13e Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 25 Jun 2010 22:20:59 +0000 Subject: Give nub's complexity in the haddock docs; fixes #4086 --- libraries/base/Data/List.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/base/Data/List.hs') 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 -- cgit v1.2.1