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. That’s why it’s crucial not to forget the arrowheads! 3. There must be a top-level arrow to show where the structure you’re 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 you’ve 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