(define (make-rat n d) (let ((n1 (if (or (and (< n 0) (< d 0)) (and (> n 0) (> d 0))) (abs n) (* -1 (abs n)))) (d1 (abs d)) (g (gcd n d))) (cons (/ n1 g) (/ d1 g))))
No comments:
Post a Comment