Spelling fix.
Adding a utility function for rewriting recursive calls as assignments.