[plt-scheme] HTDP Exercise 6.6.2

From: aditya shukla (adityashukla1983 at gmail.com)
Date: Tue Feb 24 23:45:15 EST 2009

I was solving the exercise no 6.6.2 from htdp, this is what i came up with.

;template (define fun-for-circle (lambda(a-circle)(circle-center
a-circle)(circle-radius a-center)(circle-color a-circle)))
(define-struct circle (center radius color))
(define a-circle(make-circle(make-posn 110 30) 30 'yellow))
(define draw-a-circle(lambda(a-circle)
                       (draw-circle ( circle-center a-circle)(circle-radius
a-circle)(circle-color a-circle))))

(start 300 300)

(draw-a-circle a-circle)

But i am not sure this is the right way to approach this problem ,  i have
used draw-circle to implement draw-a-circle .Any help is appreciated in
improving the solution.


Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090224/90f81dea/attachment.html>

Posted on the users mailing list.