...
Finger Exercises on List Abbreviations
- Evaluate he the following in the DrScheme interactions pane. You can cut and paste to save time if you want.
Code Block (list 1 2 3) (cons 1 (cons 2 (cons 3 empty))) (list 1 2 3 empty) (cons 1 (cons 2 (cons 3 (cons empty empty)))
- Rewrite the following using
list
.Code Block (cons (cons 1 empty) empty) (cons 1 (cons (cons 2 (cons 3 empty)) (cons 4 (cons (cons 5 empty) empty)))) (cons (cons (cons 'bozo empty) empty) empty)
...