Skip to content

Instantly share code, notes, and snippets.

@Jamonek
Created January 30, 2016 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jamonek/4d29c7c5961ecddb66a9 to your computer and use it in GitHub Desktop.
Save Jamonek/4d29c7c5961ecddb66a9 to your computer and use it in GitHub Desktop.
postfix operator ++ {}
postfix func ++(inout value: Int) -> Int {
value += 1
return value
}
postfix operator -- {}
postfix func --(inout value: Int) -> Int {
value -= 1
return value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment