2 ms·
PUSH is just an alias for CONS, useful for emphasising that you're working with a stack. The free list holds all the cons cells not in use. Note that in this m
by twic 4y ago
PUSH is just an alias for CONS, useful for emphasising that you're working with a stack.
The free list holds all the cons cells not in use. Note that in this machine, there is no way to create or destroy cons cells - that's the whole point! Rather, when you need to cons some values, you pull a cell off the free list and populate it (see the implementation of CONS), and when you want to throw a cons cell away, you put it back on the free list (see the implementations of POP and FREE).