2.1|

$ cd ~

SICP Exercise 2.1

(define (make-rat n d)
  (cond ((and (< n 0) (< d 0))
         (let ((g (gcd (* -1 n) (* -1 d))))
           (cons (/ n g) (/ d g))))
        ((< d 0)
         (let ((g (gcd (* -1 n) (* -1 d))))
           (cons (/ n g) (/ d g))))
        (else
        	(let ((g (gcd n d))
           	 (cons (/ n g) (/ d g))))))