add vector-fill!
This commit is contained in:
parent
9526ca789a
commit
b19df05e81
|
@ -417,6 +417,16 @@
|
||||||
res))
|
res))
|
||||||
(fold vector-append-2-inv #() vs))
|
(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
|
;;; 6.9 bytevector
|
||||||
|
|
||||||
(define (bytevector . objs)
|
(define (bytevector . objs)
|
||||||
|
|
Loading…
Reference in New Issue