News for hackers. Stuff that matters.
Re:Swift: The joy of sequences by Razengan on Thursday June 09, 2016 @08:58AM (#11869032)
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/proposa...

There are no comments on this comment yet.