- for-each-except exception procedure listprocedure
Applies a procedure to every item in list except ones eq? to exception.
- An element not to apply procedure to
- The procedure to apply
- The list to iterate over
(define (for-each-except exception procedure list) (define (loop items) (cond ((null? items) 'done) ((eq? (car items) exception) (loop (cdr items))) (else (procedure (car items)) (loop (cdr items))))) (loop list))