[swift-evolution] Proposal: Add function SequenceType.find()

Marco Masser lists at duckcode.com
Fri Feb 19 03:09:12 CST 2016


Yep, you are right. That looks better.

> On 2016-02-18, at 22:02, Trent Nadeau <tanadeau at gmail.com> wrote:
> 
> Indeed. I quite like the second version.
> 
> On Thu, Feb 18, 2016 at 4:01 PM, Thorsten Seitz <tseitz42 at icloud.com <mailto:tseitz42 at icloud.com>> wrote:
> 
> Am 18.02.2016 um 20:36 schrieb Trent Nadeau via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>>:
> 
>> I would prefer a label on the first parameter, since you're not finding the NSButton type but instead elements having the type of NSButton.
>> 
>> subviews.find(havingType: NSButton.self, matching: { $0.state == NSOnState })
> 
> To comply with the guidelines I would expect a phrase like
> 
> subviews.findElement(havingType: NSButton.self, matching: { $0.state == NSOnState })
> subviews.find(instanceOf: NSButton.self, matching: { $0.state == NSOnState })
> 
> -Thorsten 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160219/ba0b7a3d/attachment.html>


More information about the swift-evolution mailing list