fix evlis argumuent execution order.

This commit is contained in:
Jan Nieuwenhuizen 2016-07-09 22:01:00 +02:00
parent 6b54eb9d76
commit 1fe2fb51b1
3 changed files with 6 additions and 5 deletions

3
mes.c
View File

@ -405,7 +405,8 @@ evlis (scm *m, scm *a)
#endif
if (m == &scm_nil)
return &scm_nil;
return cons (eval (car (m), a), evlis (cdr (m), a));
scm *e = eval (car (m), a);
return cons (e, evlis (cdr (m), a));
}
scm scm_evlis = {FUNCTION2, .name="evlis", .function2 = &evlis};

View File

@ -212,10 +212,7 @@
(getchar)
'())
;; TODO *dot*
(#t (xcons (readlis a) (readword (getchar) '() a)))))
(define (xcons a b)
(cons b a))
(#t (cons (readword (getchar) '() a) (readlis a)))))
(define (readcomment c)
(cond ((eq c 10) ;; \n

View File

@ -26,6 +26,9 @@
4
(newline)
(cons (display 'one) (display '-) (display 'two))
(newline)
(display 'hello-display-symbol)
(newline)