mutating func removeAll()

in Sources/CollectionsBenchmark/Utilities/_SimpleOrderedDictionary.swift [172:181]


  mutating func removeAll(
    where shouldBeRemoved: (Element) throws -> Bool
  ) rethrows {
    var result = Self()
    for item in self {
      if try shouldBeRemoved(item) { continue }
      result[item.key] = item.value
    }
    self = result
  }