for-each   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

(define (for-each proc . lists)
  (if (null? lists)
      (apply proc)
      (if (null? (car lists))
          #t
          (let* ((unz (apply unzip1-with-cdr lists))
                 (cars (car unz))
                 (cdrs (cdr unz)))
            (apply proc cars) (apply map (cons proc cdrs))))))


Back to Index

Similar Entries