Skip to content

Instantly share code, notes, and snippets.

@efremidze
Last active August 4, 2017 23:51
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 efremidze/47aaa580b370f762b9119b3602388e35 to your computer and use it in GitHub Desktop.
Save efremidze/47aaa580b370f762b9119b3602388e35 to your computer and use it in GitHub Desktop.
extension Array where Element : Equatable {
mutating func remove(_ element: Element) -> Element? {
return index(of: element).map { remove(at: $0) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment