Created
March 28, 2017 16:08
-
-
Save vikdenic/ebbb667852caa73aa5d1606733c0100a to your computer and use it in GitHub Desktop.
Set subtracting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let planets : Set<String> = ["K186", "K186B", "Earth", "Mars"] | |
| let oldPlanets : Set<String> = ["Earth", "Mars", "Jupiter"] | |
| let addedPlanets = planets.subtracting(oldPlanets) | |
| let removedPlanets = oldPlanets.subtracting(planets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment