From: Ian Lynagh Date: Fri, 25 Jun 2010 22:20:59 +0000 (+0000) Subject: Give nub's complexity in the haddock docs; fixes #4086 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a29bd042d74b9f9d8867f2f3d375719980f5b2d1;hp=7dfe4a22aa6a2c598b1496c661c7d532aaafa94f;p=ghc-base.git Give nub's complexity in the haddock docs; fixes #4086 --- diff --git a/Data/List.hs b/Data/List.hs index 3c9fd26..87af0db 100644 --- 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) --- | 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