ZopSmart interview question

Write a program for recursion using swift