[plt-scheme] toy code for doing a ruby-quiz problem (countdown).
> However, I am seeing some occasional weirdness that I haven't been able
> to trace completely yet.
>
> So the result there is bizarre: somehow, another instance of a NUM is
> being constructed, but I've taken pains to only instantiate NUMs in a
> single place.
Ok, traced it. Good grief, that was silly of me. The bug was in the way
I was memoizing expressions: I have to ensure the cache is clean between
runs. What happened was that previous runs were interfering with current
runs. (I also forgot that equal? dives into structures if the inspector
is #f.) I have to be much more careful about state.
The program is still way too slow though; I'll have to see what other
optimizations I can make to prune the search space.
Thanks!