(use-modules (srfi srfi-1)) (define (reduce-right f ridentity lst) "`reduce-right' is a variant of `fold-right', where the first call to F is on two elements from LST, rather than one element and a given initial value. If LST is empty, RIDENTITY is returned. If LST has just one element then that's the return value." (reduce f ridentity (reverse lst))) (define-macro (and . rest) (reduce-right (lambda (a b) `(if ,a ,b #f)) #t rest)) (primitive-eval (cons 'and (make-list 10000 #f)))