2.1 Exercise 2.1
This new make-rat procedure is ultimately a case analysis. There are many ways to do it – I have chosen one that handles both cases of negative rational numbers in one case.
(define (make-rat n d) (cond ((and (> n 0) (> d 0)) (cons n d)) ((and (< n 0) (< d 0)) (cons (abs n) (abs d))) (else (cons (* -1 (abs n)) (abs d)))))