diff options
Diffstat (limited to 'module/scheme')
-rw-r--r-- | module/scheme/base.scm | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/module/scheme/base.scm b/module/scheme/base.scm index 20e280467..fcb1f49b7 100644 --- a/module/scheme/base.scm +++ b/module/scheme/base.scm @@ -56,7 +56,6 @@ bytevector bytevector-append string->vector vector->string (r7:string->utf8 . string->utf8) - (r7:vector-copy . vector-copy) (r7:vector->list . vector->list) (r7:vector-fill! . vector-fill!) vector-copy! vector-append vector-for-each vector-map @@ -116,7 +115,7 @@ (char-ready? . u8-ready?) unless unquote unquote-splicing values - vector + vector vector-copy vector-length vector-ref vector-set! vector? when with-exception-handler write-char zero?)) @@ -433,23 +432,6 @@ ;;; vector -(define (%subvector v start end) - (define mlen (- end start)) - (define out (make-vector (- end start))) - (define (itr r) - (if (= r mlen) - out - (begin - (vector-set! out r (vector-ref v (+ start r))) - (itr (+ r 1))))) - (itr 0)) - -(define r7:vector-copy - (case-lambda* - ((v) (vector-copy v)) - ((v start #:optional (end (vector-length v))) - (%subvector v start end)))) - (define* (vector-copy! target tstart source #:optional (sstart 0) (send (vector-length source))) "Copy a block of elements from SOURCE to TARGET, both of which must be @@ -467,7 +449,7 @@ defaults to 0 and SEND defaults to the length of SOURCE." (case-lambda* ((v) (vector->list v)) ((v start #:optional (end (vector-length v))) - (vector->list (%subvector v start end))))) + (vector->list (vector-copy v start end))))) (define vector-map (case-lambda* @@ -518,7 +500,7 @@ defaults to 0 and SEND defaults to the length of SOURCE." (case-lambda* ((v) (list->string (vector->list v))) ((v start #:optional (end (vector-length v))) - (vector->string (%subvector v start end))))) + (vector->string (vector-copy v start end))))) (define r7:vector-fill! (case-lambda* |