chickadee » srfi-127 » lseq-zip

lseq-zip lseq1 lseq2 ...procedure

If lseq-zip is passed n lseqs, it lazily returns an lseq each element of which is an n-element list comprised of the corresponding elements from the lseqs. If any of the lseqs are finite in length, the result is as long as the shortest lseq.

(lseq-zip '(one two three)
          (generator->lseq (make-iota-generator +inf.0 1 1))
          (generator->lseq (make-repeating-generator) '(odd even))))
 ;=> ((one 1 odd) (two 2 even) (three 3 odd))

(lseq-zip '(1 2 3)) ;=> ((1) (2) (3))