Use Ord by default for all set-like operations
Nobody has claimed this yet.
- #203 by @JordanMartinez — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend
Research direction
The issue names union, intersect, and difference, and points to #91 and #56 for prior decisions and behavior. Read those discussions and the existing implementations and tests for these functions to understand their current semantics and the proposed Ord default. Done means the intended complexity and duplicate behavior are agreed on and covered by tests; the long discussion and prior pull request show this work may need maintainer direction.
Written by the indexing model from the issue text.
Description
We already made nub use Ord by default in #91, but there are a few other unnecessarily quadratic functions in this library still which probably deserve the same treatment. I think these are union, intersect, and difference.
As well as being quadratic, union and difference have a strange-seeming behaviour where duplicates are only preserved in the first argument:
union [0, 0] [1, 1] == [0, 0, 1]
See #56 for more info. We ought to be careful about changing this behaviour but I think we should consider it, since I think it’s very likely to trip people up and we will be making breaking changes to these functions anyway if we do this.
- Dominant language
- PureScript
- Stars
- 58
- Forks
- 70
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from purescript/purescript-arrays
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
purescript/purescript-arrays#246 ·
-
generate functionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
purescript/purescript-arrays#244 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
purescript/purescript-arrays#242 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
purescript/purescript-arrays#241 ·
-
`groupBy` has unexpected `l` argument for `a -> a -> Boolean` predicateMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
purescript/purescript-arrays#229 · 3 comments ·
All issues in purescript/purescript-arrays
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day