[plt-scheme] tree->generator from t-y-scheme question
Folks,
I'm looking at the tree traversal with continuations example in Teach
Yourself Scheme in Fixnum Days. I think I have an almost complete grasp
on it but I'm missing one bit of info.
In generate-leaves:
...
(else
(call/cc
(lambda (rest-of-tree)
(set! generate-leaves
(lambda ()
(rest-of-tree 'resume)))
(caller tree))))))
Is it correct to say that rest-of-tree is passed 'resume because
generate-leaves takes no parameters?
What is the rest-of-tree continuation in this scenario, i.e. where's the
"hole"?
...
((generate-leaves
(lambda ()
(let loop ((tree tree))
...
Are we starting at the "let" here and assigning the remainder of the tree
to tree?
Thanks, Joel
--
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums