Created
October 2, 2018 20:38
-
-
Save samdods/dc6e0077208eb8acb6f76f178d44b6a2 to your computer and use it in GitHub Desktop.
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
extension Bool { | |
/// Returns true for false and false for true | |
var inverted: Bool { | |
return !self | |
} | |
} | |
// only people with non-empty street | |
people.filter(~\.address.street.isEmpty.inverted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment