On Fri, Feb 3, 2017 at 7:15 PM, Howard Lovatt via swift-users < swift-users@swift.org> wrote:
> Why not add to the library: > > extension Sequence { > func forEach(_ eacher: (Iterator.Element) throws -> Void, elser: () > throws -> Void) rethrows { > This doesn't work with break or continue and changes the meaning of return. It would be nice for Swift to support Tcl-like exceptional return codes so we can build control flow functions that work with break, continue, and return properly. http://www.tcl.tk/man/tcl/TclCmd/return.htm
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users