archives

SECD Machine - RAP?

I started writing a toy implementation of the SECD implementation based on the description at Wikipedia but I'm stuck at the RAP instruction. I can't figure out how to implement it. I've asked on StackOverflow.com but no responses. I've looked at Olivier Danvy's deconstruction of the SECD machine but I can't relate it to the more imperative description on Wikipedia (maybe my understanding of ML is just too weak).

Is RAP just the tail-recursive version of the apply function? If so then I get it, but the description sounds like something else. Thanks in advance!