Build the Standard Into the Language |
![]() ![]() ![]() |
Once we've decided that lists "are the right thing" we can go beyond just writing procedures and "making them primitive for efficiency" like length, list-ref, map, and others (list-copy, reverse, append, sublist, list-head, list-tail).
We can actually change the language so that lists have a special status.
(define (add . numbers) (add-up numbers)) (define (list . elements) elements) (define list (lambda elements elements))
(define (point.to-origin pt) (sqrt (apply + (map square pt))))
Jim Miller | ![]() |