recursive factorial function in swift