diff --git a/piclib/built-in.scm b/piclib/built-in.scm index 9c50a77a..5f35f6a7 100644 --- a/piclib/built-in.scm +++ b/piclib/built-in.scm @@ -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)) diff --git a/src/expand.c b/src/expand.c index 5095ddee..0e6add9d 100644 --- a/src/expand.c +++ b/src/expand.c @@ -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);