Adding more tutorial code from the swift book

Summary: Adding more tutorial code mainly to do with functions and
objects to the repo
By: Ross H
On: 15/6/2014