The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| ;; 2.2 | |
| ;; SICP Exercise 2.2 | |
| ;; takes x and y coordinates to create a point | |
| (define (make-point x y) | |
| (cons x y)) | |
| (define (make-segment x1 y1 x2 y2) | |
| ;; needs implementation | |
| (let |
| ;; 2.17 | |
| (define (last-pair list) | |
| (if (= (cdr list) () | |
| (car list) ;; if statement parens fixed | |
| (last-pair (cdr list)) ;; now it's called last-pair recursively | |
| ;; 2.18 | |
| (define (reverse list) | |
| (if (= (cdr list) ()) ;; if statement inserted | |
| (= new-list (cons (car list) ()))) ;; extra paren added for if statement |