converted more delightful chapter 8 examples to swift