No problem! But no, count is correct. From the docs: “endIndex: The
collection's "past the end" position---that is, the position one greater than
the last valid subscript argument."
> On 28 Jun 2016, at 22:45, Roy Henderson wrote:
>
> Definitely not trying to correct your code Tim - but, being
I expected the following code to compile:
struct Wrapper: BidirectionalCollection {
var elements: [Element]
var startIndex: Int { return 0 }
var endIndex: Int { return elements.count }
func index(after index: Int) -> Int { return index + 1 }
func index(before ind