...
- Write down and follow the list function template!
- Think about what can be done with what your template says you have to work with, namely,
and the recursive result,Code Block (first aList)
.Code Block (myFunction (rest aList))
- Never think in terms of more than one element of the list at a time (this is equivalent to the previous statement). This means do NOT think in terms of finding the length of the list or finding the middle of the list or anything of that nature! Think "first" and "rest", period.
- Use a
definition to keep you from repeating the recursive call.Code Block local