var someInt = 3 var anotherInt = 107 swap(&someInt, &anotherInt) // someInt is now 107, and anotherInt is now 3 var someString = "hello" var anotherString = "world" swap(&someString, &anotherString) // someString is now "world", // and anotherString is now "hello"
-> Int { return side * side * 2; } https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/Inheritance.html
awesomeButtonPressed:(sender: NSButton) { awesomeAsyncLib.doIt() { // use capture list to avoid retain cycle // use unowned if value can never be nil // use weak if value can possibly be nil (if you need // to check for existence) [unowned self](result: NSString) in [self.showResult(result)]; } } https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/ AutomaticReferenceCounting.html