Group Group Group Group Group Group Group Group Group

Errata Chapter 8 Data Structures & Algorithms in Swift

There is a little mistake in implementation a queue using ring buffer, namely in ring buffer class:
var first: T? {
array[readIndex]
}

it should be:
var first: T? {
return isEmpty ? nil : array[readIndex % array.count]
}