[swift-evolution] [pitch] Change filter to return an associated type

Xiaodi Wu xiaodi.wu at gmail.com
Sun Apr 23 15:30:18 CDT 2017


On Sun, Apr 23, 2017 at 3:12 PM, Ben Cohen <ben_cohen at apple.com> wrote:

>
> On Apr 23, 2017, at 1:05 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
>
> Is it the intention that `associatedtype Filtered : Sequence` once
> recursive protocol constraints are supported?
>
>
> Yup. Will add clarification.
>
> Can it be `associatedtype Filtered : Collection`?
>
>
> Sequence.lazy.filter returns a Sequence.
>


Ah, right. Collection can refine the associatedtype and constrain to
Collection, yes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170423/39d2c085/attachment.html>


More information about the swift-evolution mailing list