Created
October 7, 2020 13:13
-
-
Save diogo10/37e085e87764180d65b5fcdc00fa1d6f to your computer and use it in GitHub Desktop.
Swiftly some ideias
This file contains 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
///In order to avoid "if != nil", do: | |
var shouldBeAbleToSave: Bool { | |
let value1 = "something" | |
let value2 = "another value" | |
let value3 = nil | |
return ![value1, value2, value3].contains { $0 == nil } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment