Analysis
Students have trouble with recursion
- In Scheme, they use recursion because there is no alternative.
- In Java, theyd rather use while loops and for loops.
- Iterative loops are more concrete about their limits.
- Easy to look at and understand how the loop works.
- Since iterative loops are equivalent to tail recursion, tail recursive procedures are easy to write in Java.
- Most ended up writing reverse accidentally when they tried to write append.
- Unfortunately, they dont switch to recursion when the simple solution demands it.
- In Scheme, they used recursion to define append, but in Java they had to hack up a kludgy solution using iterative loops.