[swift-evolution] [Pitch] Add an all algorithm to Sequence

Richard Wei rxrwei at gmail.com
Sat Apr 1 01:17:05 CDT 2017

I agree. But I don’t think the predicate needs an argument label.

`membersSatisfy(_:)` or `forAll(_:)` sounds better.


> On Mar 31, 2017, at 23:02, Will Stanton via swift-evolution <swift-evolution at swift.org> wrote:
> +1 to adding, but the name `all` suggests (to me) the return of another sequence, not a Bool.
> Perhaps the function name should be question-like?
> Suggesting: `membersSatisfy(condition:)` or `allSatisfy(condition:)` or maybe even just `satisfies(condition:)`
> The question-like modifier/verb is necessary to suggest a Bool and IMO not a needless word.
> Regards,
> Will Stanton
>> On Mar 31, 2017, at 11:28, Ben Cohen via swift-evolution <swift-evolution at swift.org> wrote:
>> Hopefully non-controversial, aside from the naming of the method and arguments, about which controversy abounds
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170401/a520f92b/attachment.sig>

More information about the swift-evolution mailing list