define min-point points define min-point-iter ps if null ps let car ps

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(define (min-point points)
(define (min-point-iter p ps)
(if (null? ps)
p
(let ((q (car ps)))
(min-point-iter (cond ((< (point-y q) (point-y p)) q)
((= (point-y q) (point-y p))
(if (< (point-x q) (point-x p))
q))
(else p))
(cdr ps)))))
min-point-iter (car points) (cdr points))