<commit_before>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])
    }
  }
}
<commit_msg>Add extension for removing multiple indices<commit_after>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
  }
}

{'fraction_non_alphanumeric': 0.11535739561217269, 'fraction_numerical': 0.0014154281670205238, 'mean_word_length': 3.5031847133757963, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '116491', 'n_tokens_mistral': 423, 'n_tokens_neox': 406, 'n_words': 125}