Allow vector-append to take zero arguments
Makes vector-append behave more like append, sequence-append, etc.
This commit is contained in:
parent
74844152bc
commit
2f23f1b6b3
|
@ -169,9 +169,8 @@
|
|||
(values (vector-copy* v 0 (unsafe-fx- len n))
|
||||
(vector-copy* v (unsafe-fx- len n) len))))
|
||||
|
||||
(define (vector-append v . vs)
|
||||
(let* ([vs (cons v vs)]
|
||||
[lens (for/list ([e (in-list vs)] [i (in-naturals)])
|
||||
(define (vector-append . vs)
|
||||
(let* ([lens (for/list ([e (in-list vs)] [i (in-naturals)])
|
||||
(if (vector? e)
|
||||
(unsafe-vector-length e)
|
||||
(raise-argument-error 'vector-append "vector?" e i)))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user