Quite often, you need to write code such as the following:
if someOptional != nil { // do something with the unwrapped someOptional e.g. someF
We can use optional binding.
var x:Int? if let y = x { // x was not nil, and its value is now stored in y } else { // x was nil }