This is the code to make the Collection extension work:
extension Collection {
func skip(skip: Int) -> [Generator.Element] {
guard skip != 0 else { return [] }
var index = self.startIndex
var result: [Generator.Element] = []
var i = 0
repeat {
if i % skip == 0 {
result.append(self[index])
}
index = self.index(after: index)
i += 1
} while (index != self.endIndex)
return result
}
}
Also the part where you are making Bird conform to BooleanType doesnโt work. I could find a fix as both Bool and BooleanLiteralType arenโt protocols.