Skip to content

Add find#2

Closed
garyb wants to merge 1 commit into
masterfrom
find
Closed

Add find#2
garyb wants to merge 1 commit into
masterfrom
find

Conversation

@garyb

@garyb garyb commented May 4, 2014

Copy link
Copy Markdown
Member

Also findIndex, which I was going to leave as not exported, but figured it might be useful as we have a few index-y operations.

@joneshf

joneshf commented May 5, 2014

Copy link
Copy Markdown
Member

There's a find in Foldable: https://github.com/purescript/purescript-foldable-traversable/blob/master/src/Data/Foldable.purs#L96, isn't findIndex elemIndex ?

Or do these have different behavior from the Foldable versions?

@garyb

garyb commented May 5, 2014

Copy link
Copy Markdown
Member Author

Oh, of course! Thanks.

findIndex is different from elemIndex as it uses a predicate rather than equality. But now you mention it we have a duplicate Data.Array.elem, but a bad one as it doesn't use Eq. I'll close this, drop find, and submit a new PR that fixes these other issues.

@garyb garyb closed this May 5, 2014
@paf31 paf31 deleted the find branch May 5, 2014 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants