Created
May 20, 2016 14:49
-
-
Save tonyarnold/4f313d844ab5360e093ee9c96e8a6338 to your computer and use it in GitHub Desktop.
So wrong, so, so wrong
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension RangeReplaceableCollectionType where Index : Comparable { | |
mutating func removeAtIndexes<S : SequenceType where S.Generator.Element == Index>(indexes: S) -> [Self.Generator.Element] { | |
return indexes.sort().lazy.reverse().map { removeAtIndex($0) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment