Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pauljohanneskraft/317d55ee45b7362d9d9764bddd333b1d to your computer and use it in GitHub Desktop.
Save pauljohanneskraft/317d55ee45b7362d9d9764bddd333b1d to your computer and use it in GitHub Desktop.
Object Manipulation in Swift

Object manipulation operators

swap <->
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