scx/scheme/xlib/helper.scm

12 lines
186 B
Scheme

;;
(define (vector-map! f v)
(let ((n (vector-length v)))
(let loop ((i 0))
(if (< i n)
(begin
(vector-set! v i (f (vector-ref v i)))
(loop (+ i 1)))
v))))