Weston Hanners defines a custom Swift operator (via This Week in Swift): infix operator ?= { associativity right precedence 90 } func ?=<T>(inout left: T, right: T?) { if let value = right { left = value } } func ?=<T>(inout left: T?, right: T?) { … Continue reading If-Let Assignment Operator
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed