Week 8 [2023-05-23 Tue]

We discussed head movement.

Head movement requires us to manipulate trees in destructive ways. In order to make head movement non-destructive, we need to make heads accessible in structures. This can be done by splitting a tree into the material to the left of the head, the head itself, and the material to the right of the head.

This doesn’t work with trees as data structures (because the material to the left or right of a leaf in a tree needn’t itself be a tree), but does work with spelled-out trees (i.e. strings).