-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrella
Description
Previous ID | SR-4165 |
Radar | None |
Original Reporter | @dabrahams |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | Standard Library |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: f39656b2b2aeb1cf4e0042dba951599f
Issue Description:
If we had UpToOne<T>
as an adapter over T?
we could stop generating such a messy type from
(0..<10).lazy.flatMap { $0 < 5 ? nil : $0 }
It's currently LazyMapBidirectionalCollection<LazyFilterBidirectionalCollection<LazyMapBidirectionalCollection<(CountableRange<Int>), Int?>>, Int>
but could be
LazyCollection<FlattenBidirectionalCollection<LazyMapBidirectionalCollection<(CountableRange<Int>), UpToOne<Int>>>>
but more importantly, it would allow us to supply a single generic typealias for the result of calling lazy flatMaps
(on bidirectional collections today; on all collections once we have conditional conformance).
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrella