Instance Methodswift 6.1.2Swift

flatMap(_:)

This declaration has been renamed to Sequence.compactMap(_:).

This declaration was deprecated in Swift 4.1: Please use compactMap(_:) for the case where closure returns an optional value

func flatMap<ElementOfResult>(_ transform: (Self.Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult]