Give nub's complexity in the haddock docs; fixes #4086
authorIan Lynagh <igloo@earth.li>
Fri, 25 Jun 2010 22:20:59 +0000 (22:20 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 25 Jun 2010 22:20:59 +0000 (22:20 +0000)
Data/List.hs

index 3c9fd26..87af0db 100644 (file)
@@ -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