Created
October 9, 2024 21:18
-
-
Save christianselig/b5658dd070b40e115eb5348fa00b1e2d to your computer and use it in GitHub Desktop.
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
func store<T: Codable>(values: [String: T]) { | |
// How do I check if *this* if nil? | |
let myVal = values["hello"] | |
print(myVal) // Optional(nil) | |
print(myVal == nil) // false | |
} | |
let point1: CGPoint? = nil | |
store(values: ["hello": point1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment