Click the green flag to see the example. To use it in your own project, make CAR and CDR lists and possibly a 'return stack' list, and a NIL variable, then copy the necessary blocks. Be sure to use the 'delete all pairs!' block before using the other blocks, or at least set NIL to 0.
This is a quick restructuring to change the underlying 'pairs' data structure slightly. This should make maintenance and additions easier in the future. To do: free(list) and maintenance of FREELIST. That will need a 'join' procedure to append one list to another list.