;; image-ref: vector number number -> color
;; Return a pixel from an image (a vector of vectors); the input
;; numbers specify the row and the column, respectively.
(define image-ref
(lambda (v row col)
(vector-ref (vector-ref v row) col)))
;; image-set!: vector number number color -> side effect, changing vector
;; Set the specified pixel in an image (a vector of vectors) to a new color.
;; The input numbers specify the row and the column, respectively.
(define image-set!
(lambda (v row col color)
(vector-set! (vector-ref v row) col color)))
David G. Kay, 406B Computer Science
Monday, December 6, 2004 -- 6:57 AM