Skip to content

Instantly share code, notes, and snippets.

@gabebw
Last active October 24, 2015 07:01
Show Gist options
  • Save gabebw/6ae404396226ade1c33d to your computer and use it in GitHub Desktop.
Save gabebw/6ae404396226ade1c33d to your computer and use it in GitHub Desktop.
POP POP
postfix operator ^^ {}
// `inout` means that you can't do `let l = [1]` then `l ^^` -- `l` must be a `var`
postfix func ^^<T>(inout array: [T]) -> [T] {
return [newArray.removeLast(), newArray.removeLast()]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment