The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
While form now uses let.
[scheme.forth.jl.git]
/
scheme-library.scm
diff --git
a/scheme-library.scm
b/scheme-library.scm
index
5ee0b49
..
9a9358c
100644
(file)
--- a/
scheme-library.scm
+++ b/
scheme-library.scm
@@
-33,8
+33,8
@@
()
(append (reverse (cdr l)) (list (car l)))))
()
(append (reverse (cdr l)) (list (car l)))))
-;; LIBRARY FORMS
+;; LIBRARY SPECIAL FORMS
; let
; let
@@
-55,12
+55,15
@@
; while
(define-macro (while condition . body)
; 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
;; TESTING