Skip to content

Match nub* functions with Array #178

Closed
@milesfrain

Description

@milesfrain

The names and signatures of the nub* functions for List and Array are inconsistent.

-- List
nub :: forall a. Eq a => List a -> List a
nubBy :: forall a. (a -> a -> Boolean) -> List a -> List a

-- Array
nub :: forall a. Ord a => Array a -> Array a
nubEq :: forall a. Eq a => Array a -> Array a
nubBy :: forall a. (a -> a -> Ordering) -> Array a -> Array a
nubByEq :: forall a. (a -> a -> Boolean) -> Array a -> Array a

Proposing we make List match Array and use this lineup:

nub :: forall a. Ord a => List a -> List a
nubEq :: forall a. Eq a => List a -> List a
nubBy :: forall a. (a -> a -> Ordering) -> List a -> List a
nubByEq :: forall a. (a -> a -> Boolean) -> List a -> List a

We should also include examples and runtime info.

Metadata

Metadata

Assignees

Labels

purs-0.14A reminder to address this issue or merge this PR before we release PureScript v0.14.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions