Another short and sweet solution using recursion