feat: difference between lists
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
Currently, I use this utility function to find the difference A - B
```
// listDifference gets the elements in A that are not in B.
function listDifference(A: List, B: List): List = A.filter((s) -> !B.contains(s))
```
It would be a nice to have to be able to do A.difference(B) and have the same resulting list.
I read the contributing to implement this myself but I don't think there's enough docs to do so. I noticed that external (built-in) types (like lists) often have an external modifier for example, and in the docs it doesn't say how that links to anything.
Contributor guide
Research direction
Start with the contributing guidance and the documentation about the external modifier, then locate how built-in list types expose methods. Confirm the intended behavior from the shown A − B function and define done as A.difference(B) returning the same resulting list, with coverage for the relevant list cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100