<div dir="ltr"><div class="gmail_default"><font face="georgia, serif">I don't see the needs to call `</font><span style="font-size:12.800000190734863px">for domain in domains` with `</span><span style="font-size:12.800000190734863px">domains:</span><span style="font-size:12.800000190734863px">OptionSet`. If a parameter want an </span><span style="font-size:12.800000190734863px">OptionSet, why not just use`</span><span style="font-size:12.800000190734863px">domains` directly instead of `domain`?</span></div><div class="gmail_default"><span style="font-size:12.800000190734863px"><br></span></div><div class="gmail_default"><span style="font-size:12.800000190734863px">Zhaoxin</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 13, 2017 at 12:09 AM, J.E. Schotsman via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Recently I wrote code like this:<br>
<br>
let domains:[FileManager.<wbr>SearchPathDomainMask] = [.userDomainMask, .localDomainMask, .networkDomainMask]<br>
for domain in domains { … }<br>
<br>
But I would prefer this:<br>
<br>
let domains:FileManager.<wbr>SearchPathDomainMask = [.userDomainMask,.<wbr>localDomainMask, .networkDomainMask]<br>
for domain in domains { … }<br>
<br>
This requires this OptionSet to conform to Sequence.<br>
Would it be possible to generically conform all OptionSets with RawValue:IntegerArithmetic to Sequence?<br>
I’ve tried but it seems to be tricky.<br>
<br>
Jan E.<br>
______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div>