<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Title content=""><meta name=Keywords content=""><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Perhaps<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>allMembersMatch()<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>or<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>everyMemberMatches()<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This reads well in use.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 2017-04-02, 6:18 PM, "Ricardo Parada via swift-evolution" <<a href="mailto:swift-evolution-bounces@swift.org">swift-evolution-bounces@swift.org</a> on behalf of <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> or perhaps containsOnly()<o:p></o:p></p><p class=MsoNormal> or maybe allMatch()<o:p></o:p></p><p class=MsoNormal> or membersMatch()<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> :-)<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> Sent from my iPhone<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> > On Apr 2, 2017, at 1:57 AM, Rien via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> >> On 02 Apr 2017, at 07:51, Karl Wagner via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >> Given the relationship to contains, why not keep it simple and go with:<o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >> onlyContains(_ element:)<o:p></o:p></p><p class=MsoNormal> >> onlyContains(_ matching:)<o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >> [9, 9, 9, 9, 9].onlyContains(9) // true<o:p></o:p></p><p class=MsoNormal> >> [1, 2, 3, 2, 3].onlyContains { $0 < 3 } // false<o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >> - Karl<o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> > IMO, we have a winner!<o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> > Rien.<o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >>> On 1 Apr 2017, at 10:47, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> On Sat, Apr 1, 2017 at 3:40 AM, David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>>> On 1 Apr 2017, at 09:50, Brandon Trussell <<a href="mailto:brandon2k3@gmail.com">brandon2k3@gmail.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> I agree that based on the method name, I thought a collection would be returned. <o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> Now that I think more about it, I think you're right. It is confusing. Perhaps:<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> allAre(equalTo: )<o:p></o:p></p><p class=MsoNormal> >>> allAre(matching: )<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> Well, if we're going to go full stdlib naming guidelines, shouldn't they be--<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> ```<o:p></o:p></p><p class=MsoNormal> >>> areAll(equalTo:)<o:p></o:p></p><p class=MsoNormal> >>> areAll(matching:)<o:p></o:p></p><p class=MsoNormal> >>> ```<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>>> On Sat, Apr 1, 2017 at 12:36 AM, David Hart via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>>> On 1 Apr 2017, at 06:02, Will Stanton via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>>>> <o:p></o:p></p><p class=MsoNormal> >>>>> +1 to adding, but the name `all` suggests (to me) the return of another sequence, not a Bool.<o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> I'm not too concerned because the mandatory labels makes it clear.<o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>>> Perhaps the function name should be question-like?<o:p></o:p></p><p class=MsoNormal> >>>>> <o:p></o:p></p><p class=MsoNormal> >>>>> Suggesting: `membersSatisfy(condition:)` or `allSatisfy(condition:)` or maybe even just `satisfies(condition:)`<o:p></o:p></p><p class=MsoNormal> >>>>> The question-like modifier/verb is necessary to suggest a Bool and IMO not a needless word.<o:p></o:p></p><p class=MsoNormal> >>>>> <o:p></o:p></p><p class=MsoNormal> >>>>> Regards,<o:p></o:p></p><p class=MsoNormal> >>>>> Will Stanton<o:p></o:p></p><p class=MsoNormal> >>>>> <o:p></o:p></p><p class=MsoNormal> >>>>>> On Mar 31, 2017, at 11:28, Ben Cohen via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<o:p></o:p></p><p class=MsoNormal> >>>>>> <o:p></o:p></p><p class=MsoNormal> >>>>>> Hopefully non-controversial, aside from the naming of the method and arguments, about which controversy abounds<o:p></o:p></p><p class=MsoNormal> >>>>> <o:p></o:p></p><p class=MsoNormal> >>>>> _______________________________________________<o:p></o:p></p><p class=MsoNormal> >>>>> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> >>>>> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> >>>>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> _______________________________________________<o:p></o:p></p><p class=MsoNormal> >>>> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> >>>> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> >>>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> <o:p></o:p></p><p class=MsoNormal> >>>> -- <o:p></o:p></p><p class=MsoNormal> >>>> Brandon<o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> _______________________________________________<o:p></o:p></p><p class=MsoNormal> >>> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> >>> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> >>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> <o:p></o:p></p><p class=MsoNormal> >>> _______________________________________________<o:p></o:p></p><p class=MsoNormal> >>> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> >>> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> >>> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> >> <o:p></o:p></p><p class=MsoNormal> >> _______________________________________________<o:p></o:p></p><p class=MsoNormal> >> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> >> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> >> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> > <o:p></o:p></p><p class=MsoNormal> > _______________________________________________<o:p></o:p></p><p class=MsoNormal> > swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> > <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> > <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> _______________________________________________<o:p></o:p></p><p class=MsoNormal> swift-evolution mailing list<o:p></o:p></p><p class=MsoNormal> <a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><o:p></o:p></p><p class=MsoNormal> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> <o:p></o:p></p></div></body></html>