exit in fold added by Kooda on Tue Dec 1 17:55:18 2020

(define (fold/exit pred? kons knil l . rest)
  (call/cc (lambda (return)
    (apply fold
           (lambda (o acc)
             (if (pred? acc)
                 (return acc)
                 (kons o acc)))
           knil
           l
           rest))))

;; (fold/exit zero? * 1 '(1 2 0 3 4 5 6))