On Thu, May 19, 2016, at 04:20 PM, Trent Nadeau via swift-evolution wrote:
> Also note that there's a typo in the second example:
>
> for view in sequence(initial: someView, next: { $.superview }) {  //
> someView, someView.superview, someView.superview.superview, ... }
>
> should be:
>
> for view in sequence(state: someView, next: { $.superview }) {  //
> someView, someView.superview, someView.superview.superview, ... }
 
The code as written is correct. The rewritten version would actually
just emit [someView.superview, someView.superview, someView.superview,
...] forever. I imagine the confusion stems from the fact that there's 2
examples but they both demonstrate just the first function, and there's
no examples of the second function, which is something I'll try to
address soon.
 
-Kevin Ballard
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to