April 2017
Intermediate to advanced
316 pages
9h 33m
English
An identifier pattern matches any value and binds the matched value to a variable or constant name. For instance, in the following example, ourConstant is an identifier pattern that matches the value of 7:
let ourConstant = 7 switch ourConstant { case 7: print("7") default: print("a value") }
An identifier pattern is a sub-pattern of the value-binding pattern.
Read now
Unlock full access