Files
SwiftLint/Source/SwiftLintFramework/Extensions/shim.swift
T
2018-05-30 14:00:17 +10:00

12 lines
233 B
Swift

#if !swift(>=4.1)
extension Sequence {
func compactMap<ElementOfResult>(
_ transform: (Self.Element
) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
return try flatMap(transform)
}
}
#endif