make-rat の別の実装
(define (make-rat n d)
  (let ((g (gcd n d)))
    (cons (/ n g) (/ d g))))
> (print-rat (+rat one-third one-third))
2/3
done


一覧 前へ 次へ