split last example of chapter 8 into two, one in Swift (prohibitively slow), one in Objective-C