Skip to content

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