Skip to content

Instantly share code, notes, and snippets.

@daehn
Last active August 29, 2015 14:16
Show Gist options
  • Save daehn/fe15c22f853c51543f91 to your computer and use it in GitHub Desktop.
Save daehn/fe15c22f853c51543f91 to your computer and use it in GitHub Desktop.
Swift Array convenience extention
extension Array {
mutating func pop() -> T? {
return self.removeAtIndex(0)
}
mutating func push(element: T) {
self.append(element)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment