for-each   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/adt.xtm

Implementation

(bind-func for-each:[void,[!a,!b,!c]*,List{!b}*,List{!c}*]*
  (lambda (func xs1 xs2)
    (let ((f (lambda (l1 l2)
               (if (null? l1) void
                   (begin (func (car l1) (car l2))
                          (f (cdr l1) (cdr l2)))))))
      (f xs1 xs2))))


Back to Index

Similar Entries