extension String: Error {
  public func print(terminator: String = "") {
    Swift.print(self, terminator: terminator)
  }
}

extension Array {
  public mutating func transform(by transforming: (Element) throws -> Element) rethrows {
    for index in 0..<count {
      self[index] = try transforming(self[index])
    }
  }

  public mutating func transform<S: Sequence>(at indices: S, by transforming: (Element) throws -> Element) rethrows
  where Index == S.Iterator.Element {
    for index in indices {
      self[index] = try transforming(self[index])
    }
  }

  public mutating func remove(at indices: [Index]) -> [Element] {
    var removed: [Element] = []
    for index in indices {
      removed.append(remove(at: index))
    }
    return removed
  }
}

extension String: Error {
  public func print(terminator: String = "") {
    Swift.print(self, terminator: terminator)
  }
}

extension Array {
  public mutating func transform(by transforming: (Element) throws -> Element) rethrows {
    for index in 0..<count {
      self[index] = try transforming(self[index])
    }
  }

  public mutating func transform<S: Sequence>(at indices: S, by transforming: (Element) throws -> Element) rethrows
  where Index == S.Iterator.Element {
    for index in indices {
      self[index] = try transforming(self[index])
    }
  }
}

--- 
+++ 
@@ -17,4 +17,12 @@
       self[index] = try transforming(self[index])
     }
   }
+
+  public mutating func remove(at indices: [Index]) -> [Element] {
+    var removed: [Element] = []
+    for index in indices {
+      removed.append(remove(at: index))
+    }
+    return removed
+  }
 }
Add extension for removing multiple indices
