[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: vector-unzip



To quote from the reference implementation:

;; Convenient abbreviations for common unzipping.
(define (vector-unzip1 vec)
  (check-arg vector? vec 'vector-unzip1)
  (vector-unzip vec 0))
(define (vector-unzip2 vec)
  (check-arg vector? vec 'vector-unzip2)
  (vector-unzip vec 1))
(define (vector-unzip3 vec)
  (check-arg vector? vec 'vector-unzip3)
  (vector-unzip vec 2))
(define (vector-unzip4 vec)
  (check-arg vector? vec 'vector-unzip4)
  (vector-unzip vec 3))
(define (vector-unzip5 vec)
  (check-arg vector? vec 'vector-unzip5)
  (vector-unzip vec 5))

This would seem to corroborate my assumption that (vector-unzipn vec) ==
(vector-unzip vec (- n 1)).

But even if I am mistaken, my main point was the definition of
vector-unzip5, which breaks the pattern.

Regards

Michael Burschik