Skip to content

Make elements test no longer hang at cost of possible false negative #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 5, 2020
Merged

Make elements test no longer hang at cost of possible false negative #29

merged 3 commits into from
Dec 5, 2020

Conversation

JordanMartinez
Copy link
Contributor

See this conversation for context.

test/Main.purs Outdated
-- implement a Set-like value without depending on ordered-collections
-- because that library depends on this one.
addElemIfNew arr e = if Array.elem e arr then arr else Array.snoc arr e
actualElems = Array.sort $ foldl addElemIfNew [] elems
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just use nub + sort of elems? 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a lot better. Thanks!

@JordanMartinez JordanMartinez merged commit 84b991c into purescript:master Dec 5, 2020
@JordanMartinez JordanMartinez deleted the fixGenTest branch December 5, 2020 01:34
@JordanMartinez
Copy link
Contributor Author

Thanks! I had forgotten about this PR.

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.

3 participants