Practice with recursion using ruby.