Example Swift app which calculates factorials