I am a bit stuck on rendering images in a list.

Here is my code below.

(require 2htdp/image)

(define-struct bear-state (x y rotation size))

(define MTS (empty-scene WIDTH HEIGHT))

BEAR-IMAGE is just a graphic - of a bear.

(define (render-bear b)
  (place-image (scale (bear-state-size b) (rotate (bear-state-rotation b) 
BEAR-IMAGE))  (bear-state-x b) (bear-state-y b) MTS))



(define (render-bears bears)
  (cond [(empty? bears) (place-image (square 0 "outline" "white") 0 0 MTS)]
        [else
          (render-bear (first bears))       ; can render 1 bear
                         (render-bears (rest bears))]))


render-bear works but I can't get render-bears to work.  What am I doing wrong? 
Any hints?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to