define gift-wrapping points let minp min-point points lst define gift-

1
2
3
4
5
6
7
8
9
(define (gift-wrapping points)
(let ((minp (min-point points)) (lst '()))
(define (gift-iterate p res)
(let ((q (wrap-step p points)))
(point-pretty-print q)
(if (point=? minp q)
(cons res q)
(gift-iterate q (cons res q)))))
(gift-iterate (car points) '())))