on Wed May 04 2016, Chris Lattner <[email protected]> wrote:
> Proposal link: > https://github.com/apple/swift-evolution/blob/master/proposals/0045-scan-takewhile-dropwhile.md > > Hello Swift Community, > > The review of SE-0045: "Add scan, prefix(while:), drop(while:), and > unfold to the stdlib" ran from April 28...May 3, 2016. A subset of the > proposal is *accepted, with modifications* for Swift 3. This proposal > included four new additions to the standard library: > > Sequence.prefix(while:) & Sequence.drop(while:) - These are *accepted* as > specified in revision 3 of the proposal. I know the review is over and all, but… Chris brought to my attention an idea that I liked, and asked me to post here about it. Specifically, the argument label “where:” would probably be better than “while:”. “While” makes it sound to me like it's going to take a nullary predicate and be much more active. But it's hard to love s.drop(where: { $0 > 1 }) s.drop { $0 > 1 } because it makes it sound like a general filtering operation. Therefore, I'd much rather see s.droppingPrefix(where: {$0 > 1}) -- Dave _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
