We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
md5: d7a13ecbc1a535d769141383adecf60a
Issue Description:
Right now applying reversed() twice will result in a ReversedCollection<ReversedCollection<Base>>.
reversed()
(swift) [1,2].lazy.reversed() // r0 : LazyCollection<ReversedCollection<[Int]>> = Swift.LazyCollection<Swift.ReversedCollection<Swift.Array<Swift.Int>>>(_base: Swift.ReversedCollection<Swift.Array<Swift.Int>>(_base: [1, 2])) (swift) r0.reversed() // r1 : LazyCollection<ReversedCollection<ReversedCollection<[Int]>>> = Swift.LazyCollection<Swift.ReversedCollection<Swift.ReversedCollection<Swift.Array<Swift.Int>>>>(_base: Swift.ReversedCollection<Swift.ReversedCollection<Swift.Array<Swift.Int>>>(_base: Swift.ReversedCollection<Swift.Array<Swift.Int>>(_base: [1, 2]))) (swift) [1].reversed() // r2 : ReversedCollection<[Int]> = Swift.ReversedCollection<Swift.Array<Swift.Int>>(_base: [1]) (swift) r2.reversed() // r3 : ReversedCollection<ReversedCollection<[Int]>> = Swift.ReversedCollection<Swift.ReversedCollection<Swift.Array<Swift.Int>>>(_base: Swift.ReversedCollection<Swift.Array<Swift.Int>>(_base: [1]))
I believe we can be smarter and avoid this nesting.
The text was updated successfully, but these errors were encountered:
The regular (non-lazy) version fixed in #15815
Sorry, something went wrong.
lazy version fixed in the PR, by adding ReversedCollectionProtocol
Merged the non-lazy variant here: 02aef12
Lazy version is harder to implement without extra protocols or new compiler features, so not doing it for now.
Moximillian
No branches or pull requests
Additional Detail from JIRA
md5: d7a13ecbc1a535d769141383adecf60a
Issue Description:
Right now applying
reversed()
twice will result in a ReversedCollection<ReversedCollection<Base>>.I believe we can be smarter and avoid this nesting.
The text was updated successfully, but these errors were encountered: