Using Version 7.3.1 (7D1014) of Xcode gives a warning ‘++ is deprecated & will be removed in Swift 3’ for the ++position statement in the advance() function. Eek! Using instead position.advancedBy(1) gave an almighty crash, but using position = position.successor() seemed to work. I guess the second edition of the book will be Swift 3 compatible (with free upgrades for all those who bought the first edition, hint, hint… ).
Notice the implicitly unwrapped expression of alarm there…