Swift version of my Scala code for "Exploring type-directed test-driven development: a case study using FizzBuzz"