Skip to content

Instantly share code, notes, and snippets.

@michaeleisel
Last active March 22, 2019 16:11
Show Gist options
  • Save michaeleisel/c5deeefa268689f36475f5c55a802a76 to your computer and use it in GitHub Desktop.
Save michaeleisel/c5deeefa268689f36475f5c55a802a76 to your computer and use it in GitHub Desktop.
postfix operator ~
public postfix func ~<T>(lhs: (T, T)) -> [T] {
return [lhs.0, lhs.1]
}
func go() {
(0, 0)~ // '~' is not a postfix unary operator
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment