Alternative implementation

This commit is contained in:
Sanel Zukan 2008-10-17 13:41:56 +00:00
parent a28b95f255
commit a54c25ff78

View File

@ -213,8 +213,7 @@
; (apply proc cars) (apply map (cons proc cdrs)))))) ; (apply proc cars) (apply map (cons proc cdrs))))))
(define (for-each proc lst) (define (for-each proc lst)
(if (null? lst) (if (not (null? lst))
lst
(begin (begin
(proc (car lst)) (proc (car lst))
(for-each proc (cdr lst))))) (for-each proc (cdr lst)))))