mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
feat: difference between lists #55
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZackarySantana on GitHub (Feb 11, 2024).
Currently, I use this utility function to find the difference A - B
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.
@bioball commented on GitHub (Feb 13, 2024):
Fair enough; seems sensible to have this.
FYI: our
SetAPI does have adifference:Feel free to submit a PR! Take a look at ListNodes.java for where our List methods are implemented.
You will also need to add tests here: https://github.com/apple/pkl/blob/main/pkl-core/src/test/files/LanguageSnippetTests/input/api/list.pkl.