Swift protocol which requires a specific type of sequence

I really can’t explain it any better than the hat tip did! What you want:

Swift 3.0
protocol HasSequenceOfInts {
    var seq : SequenceType { get }
}

What you need to write:

Swift 3.0
protocol HasSequenceOfInts {
    var seq : AnySequence { get }
}
class ArrayOfInts : HasSequenceOfInts {
    var _seq : [Int] = [0,1,2]
    var seq : AnySequence {
        get {
            return AnySequence(self._seq)
        }
    }
}

h/t