Optional is an enumeration with two possible cases, .None and .Some . The .Some case has an associated value, which is a wrapped value. For an "expand", it is not necessary to return this bound value. It is as if you did this:
let anOptional : String? = "wrapping" switch anOptional { case .Some(let theString): println(theString)
source share