Yes - I’m not sure about gif but I’ve seen video
It certainly does animations
Some examples
Suppose I have a loop which recursively calls parameterize
such that the recursive call is within the parameterize block and there are no statements after. Am I right in thinking that it’s going to leak memory until the loop is exited?
the body of parameterize
is in tail position with respect to the whole parameterize
form, if that’s what you’re asking
Memory should be constant, not linear to the depth of recursion.
Oh awesome!
….how on earth does that work? magic
or does it only work if you’re setting the same parameter each time the loop executes?
If you are parameterizing an unbounded number of parameters then it will use unbounded space
But if you alternate between two of them, say, it still uses constant space
O_o
It’s just continuation marks
You can think of parameters as a continuation mark that maps to a hash
heh I just worked out that analogy right before you said it
alright this makes sense, and is very cool
It’s actually not an analogy, that’s how it’s implemented