This preview shows page 1. Sign up to view the full content.
Unformatted text preview: y rectangle. 2. The direction of arrows (up, down, left, right) is irrelevant. You can draw them however you want to make the arrangement of pairs neat. Thats why its crucial not to forget the arrowheads! 3. There must be a top-level arrow to show where the structure youre representing begins. How do you draw a diagram for a complicated list? Take this example: ((a b) c (d (e f))) You begin by asking yourself how many elements the list has. In this case it has three elements: Frst (a b) , then c , then the rest. Therefore you should draw a three-pair backbone : three pairs with the cdr of one pointing to the next one. (The Fnal cdr is null.) Only after youve drawn the backbone should you worry about making the car s of your three pairs point to the three elements of the top-level list. 289...
View Full Document
- Spring '10