[plt-scheme] Scheme exercise(image.ss)

From: aditya shukla (adityashukla1983 at gmail.com)
Date: Thu Feb 26 22:27:42 EST 2009

I came up with this

(define turn-off-red (lambda(traffic-light)
                   (overlay/xy (overlay/xy  LIGHT-FRAME 0 0 traffic-light) 0
(- OFFSET) (circle RADIUS 'solid 'white)) ))

(turn-off-red (overlay/xy (overlay/xy (overlay/xy LIGHT-FRAME 0 OFFSET GREEN
)
                          0 0 (circle RADIUS 'outline 'white))
              0 (- OFFSET) RED ))
(define traffic-light (overlay/xy (overlay/xy (overlay/xy LIGHT-FRAME 0
OFFSET GREEN )
                          0 0 (circle RADIUS 'outline 'white))
              0 (- OFFSET) RED ))

traffic-light

(turn-off-red ALL-THREE-ON)

ALL-THREE-ON

I think i got this now.

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

Posted on the users mailing list.