> On Jun 23, 2016, at 12:39 AM, David Hart <[email protected]> wrote: >> - for test in removeFirstTests.filter({ $0.numberToRemove == 1 }) { >> + for test in removeFirstTests.filter( >> + suchThat: { $0.numberToRemove == 1 } >> >> The difference between `filter` and `forEach` is that `forEach` is >> explicitly >> procedural while `filter` is functional. I do not like functional chainable >> calls being modified to use explicit external labels in this way. >> >> I'd prefer no label here. > > Quick aside. Eric, if you prefer no label here, why did you not also prefer > no labels for contains and elementsEqual? They also have very functional. But > if we must have a label, I’d vote for `where`.
contains and elementsEqual both return Booleans which are almost never chained. -- E
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
