Directory Handling, one token at a time

Five programs that copy or delete a whole directory tree, however deep it goes, on a calculator whose entire file system is a variable list. There is no path type, no recursion primitive and no way to ask what kind of thing a name holds. Watch what they use instead: a list turned into text and back, and an error message read as an answer.

CPYDR and DELDR are the only programs in the notebook that call themselves. The recursion is the part I still remember enjoying, the only thing about them that survived thirty-seven years. The question inked on the page is about the recursion too.

The listing

The variable tree

running
Space or → steps · Enter runs to the next note. Underlined tokens have something to say. The highlighted line of the tree is the current directory.

The stack

The screen — 137 × 32

What is happening