While form now uses let.
[scheme.forth.jl.git] / scheme-library.scm
index 5ee0b49..9a9358c 100644 (file)
@@ -33,8 +33,8 @@
     ()
     (append (reverse (cdr l)) (list (car l)))))
 
-;; LIBRARY FORMS
 
+;; LIBRARY SPECIAL FORMS
 
 ; let
 
 ; while
 
 (define-macro (while condition . body)
-              (define loop (gensym))
-              `(begin
-                 (define (,loop)
-                   (if ,condition
-                     (begin ,@body (,loop))))
-                 (,loop)))
+              (let ((loop (gensym)))
+                `(begin
+                   (define (,loop)
+                     (if ,condition
+                       (begin ,@body (,loop))))
+                   (,loop))))
+
+; cond
+
 
 ;; TESTING