Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,319
Issues
4,319
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
368
Merge Requests
368
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
039b6e19
Commit
039b6e19
authored
Jun 25, 2010
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give nub's complexity in the haddock docs; fixes
#4086
parent
02d543a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
libraries/base/Data/List.hs
libraries/base/Data/List.hs
+1
-1
No files found.
libraries/base/Data/List.hs
View file @
039b6e19
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment