Some short exercises in recursion in Ruby