Eliminate side effects through the use of recursion and a default value.