As I learn Scheme, I am sort of mentally figuring out what the minimum
set of primitives is. Initially, I thought that dynamic-wind must be a
primitive, but now I'm not so sure.
If call/cc were never invented, you could make dynamic-wind by saying
(lambda (a b c)
(begin a b c)))
Since the only way into b is by calling it, this ensures that a and c
are called before and after it. The problem, as so often, is that
call/cc means we can jump into b from anywhere.
So what if you masked call/cc somehow? If b calls call/cc then it
really calls our fake call/cc, which returns a continuation that calls
a first and c after.
I'm not entirely sure how to fake it. fluid-let would only work if they
haven't made another name point at call/cc, which means it's probably
Am I on the right track? Do I completely misunderstand some feature of