shim.swift 204 B

123456789
  1. #if !swift(>=4.2)
  2. extension Collection {
  3. public func firstIndex(
  4. where predicate: (Element) throws -> Bool
  5. ) rethrows -> Index? {
  6. return try index(where: predicate)
  7. }
  8. }
  9. #endif