2 ms·
I like this one better from the actual proposal on GitHub [1]: for view in sequence(first: someView, next: { $0.superview }) { // someView, someView.supe
by Razengan 10y ago
I like this one better from the actual proposal on GitHub [1]:
for view in sequence(first: someView, next: { $0.superview }) {
// someView, someView.superview, someView.superview.superview, ...
}
Seems rather handy.
[1]: https://github.com/apple/swift-evolution/blob/master/proposals/0094-sequence-function.md https://github.com/apple/swift-evolution/blob/master/proposa...