Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/Data/List.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,14 @@ Running time: `O(n)`
nub :: forall a. (Eq a) => List a -> List a
```

Special case of `nubBy`: `nubBy eq`

#### `nubBy`

``` purescript
nubBy :: forall a. (a -> a -> Boolean) -> List a -> List a
```

Remove duplicate elements from a list, using the specified function to
determine equality of elements. The first occurence of an element is always
the one that is kept.
Remove duplicate elements from a list, using the specified
function to determine equality of elements.

Running time: `O(n^2)`

Expand Down Expand Up @@ -664,3 +661,5 @@ second components.
``` purescript
foldM :: forall m a b. (Monad m) => (a -> b -> m a) -> a -> List b -> m a
```


9 changes: 4 additions & 5 deletions docs/Data/List/Lazy.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,17 +482,14 @@ Running time: `O(n)`
nub :: forall a. (Eq a) => List a -> List a
```

Special case of `nubBy`: `nubBy eq`

#### `nubBy`

``` purescript
nubBy :: forall a. (a -> a -> Boolean) -> List a -> List a
```

Remove duplicate elements from a list, using the specified function to
determine equality of elements. The first occurence of an element is always
the one that is kept.
Remove duplicate elements from a list, using the specified
function to determine equality of elements.

Running time: `O(n^2)`

Expand Down Expand Up @@ -586,3 +583,5 @@ zip :: forall a b. List a -> List b -> List (Tuple a b)
Collect pairs of elements at the same positions in two lists.

Running time: `O(min(m, n))`


2 changes: 1 addition & 1 deletion src/Data/List.purs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import Data.Maybe
import Data.Tuple (Tuple(..))
import Data.Monoid
import Data.Foldable
import Data.Unfoldable
import Data.Unfoldable (Unfoldable, unfoldr)
import Data.Traversable

import Control.Alt
Expand Down
2 changes: 1 addition & 1 deletion src/Data/List/Lazy.purs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ import Data.Maybe
import Data.Monoid
import Data.Traversable
import Data.Tuple (Tuple(..), fst, snd)
import Data.Unfoldable
import Data.Unfoldable (Unfoldable, unfoldr)

import qualified Control.Lazy as Z

Expand Down