This code was presented in lecture introducing the Swift programming language. As indicated in the comments, the material draws heavily from Apple's Tour of Swift.
There are several branches -- the students branch has some code missing because it is part of in-class exercises, while solutions has the missing code restored for TA and instructor use in class.