From a54c25ff7859ae331032b7271f106204a9cafbcd Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 17 Oct 2008 13:41:56 +0000 Subject: [PATCH] Alternative implementation --- tools/capone/lib/capone.init | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/capone/lib/capone.init b/tools/capone/lib/capone.init index cb24b2f..7059578 100644 --- a/tools/capone/lib/capone.init +++ b/tools/capone/lib/capone.init @@ -212,12 +212,11 @@ ; (cdrs (cdr unz))) ; (apply proc cars) (apply map (cons proc cdrs)))))) -(define (for-each proc lst) - (if (null? lst) - lst - (begin - (proc (car lst)) - (for-each proc (cdr lst))))) +(define (for-each proc lst) + (if (not (null? lst)) + (begin + (proc (car lst)) + (for-each proc (cdr lst))))) (define (list-tail x k) (if (zero? k)