starting to convert Bk 2 chapter 6 examples to Swift