swap <->
Last active
July 1, 2016 08:02
-
-
Save pauljohanneskraft/317d55ee45b7362d9d9764bddd333b1d to your computer and use it in GitHub Desktop.
Object Manipulation in Swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| infix operator <-> { associativity left precedence 140 assignment } | |
| func <-> <T>( left: inout T, right: inout T) { | |
| swap(&left, &right) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment