Writing Recursive Functions in Processing