add vector-fill!

This commit is contained in:
Yuichi Nishiwaki 2013-11-17 17:33:37 +09:00
parent 9526ca789a
commit b19df05e81
1 changed files with 10 additions and 0 deletions

View File

@ -417,6 +417,16 @@
res))
(fold vector-append-2-inv #() vs))
(define (vector-fill! v fill . opts)
(let ((start (if (pair? opts) (car opts) 0))
(end (if (>= (length opts) 2)
(cadr opts)
(vector-length v))))
(do ((i start (+ i 1)))
((< i end)
#f)
(vector-set! v i fill))))
;;; 6.9 bytevector
(define (bytevector . objs)