@@ -34,12 +34,12 @@ extension LazySequenceProtocol {
34
34
/// - Parameter transform: A closure that accepts an element of this
35
35
/// sequence as its argument and returns an optional value.
36
36
@warn_unused_result
37
- public func flatMap< U > (
38
- _ transform: ( Self . Elements . Iterator . Element ) -> U ?
37
+ public func flatMap< ElementOfResult > (
38
+ _ transform: ( Elements . Iterator . Element ) -> ElementOfResult ?
39
39
) -> LazyMapSequence <
40
40
LazyFilterSequence <
41
- LazyMapSequence < Self . Elements , U ? > > ,
42
- U
41
+ LazyMapSequence < Elements , ElementOfResult ? > > ,
42
+ ElementOfResult
43
43
> {
44
44
return self . map ( transform) . filter { $0 != nil } . map { $0! }
45
45
}
@@ -71,12 +71,12 @@ extension LazyCollectionProtocol {
71
71
/// - Parameter transform: A closure that accepts an element of this
72
72
/// collection as its argument and returns an optional value.
73
73
@warn_unused_result
74
- public func flatMap< U > (
75
- _ transform: ( Self . Elements . Iterator . Element ) -> U ?
74
+ public func flatMap< ElementOfResult > (
75
+ _ transform: ( Elements . Iterator . Element ) -> ElementOfResult ?
76
76
) -> LazyMapCollection <
77
77
LazyFilterCollection <
78
- LazyMapCollection < Self . Elements , U ? > > ,
79
- U
78
+ LazyMapCollection < Elements , ElementOfResult ? > > ,
79
+ ElementOfResult
80
80
> {
81
81
return self . map ( transform) . filter { $0 != nil } . map { $0! }
82
82
}
@@ -114,12 +114,12 @@ extension LazyCollectionProtocol
114
114
///
115
115
/// - Parameter transform: A closure that accepts an element of this
116
116
/// collection as its argument and returns an optional value.
117
- public func flatMap< U > (
118
- _ transform: ( Self . Elements . Iterator . Element ) -> U ?
117
+ public func flatMap< ElementOfResult > (
118
+ _ transform: ( Elements . Iterator . Element ) -> ElementOfResult ?
119
119
) -> LazyMapBidirectionalCollection <
120
120
LazyFilterBidirectionalCollection <
121
- LazyMapBidirectionalCollection < Self . Elements , U ? > > ,
122
- U
121
+ LazyMapBidirectionalCollection < Elements , ElementOfResult ? > > ,
122
+ ElementOfResult
123
123
> {
124
124
return self . map ( transform) . filter { $0 != nil } . map { $0! }
125
125
}
0 commit comments