Hi Ben

One useful tactic for problem-solving is to solve a simpler, related
problem first, and then go back to the real thing with additional insight.
In this case, can you write a program to list all the paths in the tree
from root to leaf?

Some more hints:

   - Review the docs on letrec syntax; here you're using letrec like a
   plain let
   - Instead of "backtrack", consider returning #f (false) when you hit a
   leaf that's a non-match
   - Use symbols instead of strings in your example-tree: '(E (B (S)) (U
   (V) ...)
   - Consider using first and rest instead of car, cdr and friends

Dan
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to