This commit is contained in:
Yuichi Nishiwaki 2013-11-01 19:04:07 +09:00
parent 346b159e7e
commit 404ccb7fb1
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,9 @@
; Although looking like a magic, it works nice.
(define (car x) (car x))
(define (cdr x) (cdr x))
; Although looking like a magic, it just works.
(define (car x)
(car x))
(define (cdr x)
(cdr x))
(define (zero? n)
(= n 0))

View File

@ -117,8 +117,9 @@ expand(pic_state *pic, pic_value obj, struct syntactic_env *env)
}
v = pic_nil_value();
for (; ! pic_nil_p(obj); obj = pic_cdr(pic, obj)) {
while (! pic_nil_p(obj)) {
v = pic_cons(pic, expand(pic, pic_car(pic, obj), env), v);
obj = pic_cdr(pic, obj);
}
v = pic_reverse(pic, v);