mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Removed debug code
This commit is contained in:
parent
9443f92fe2
commit
327941b980
3 changed files with 17 additions and 5 deletions
|
@ -1873,8 +1873,8 @@ object apply(object cont, object func, object args){
|
|||
Cyc_rt_raise2("Call of non-procedure: ", func);
|
||||
} else if (strncmp(((symbol)fobj)->pname, "lambda", 7) == 0) {
|
||||
make_cons(c, func, args);
|
||||
printf("JAE DEBUG, sending to eval: ");
|
||||
Cyc_display(&c, stderr);
|
||||
//printf("JAE DEBUG, sending to eval: ");
|
||||
//Cyc_display(&c, stderr);
|
||||
((closure)__glo_eval)->fn(2, __glo_eval, cont, &c, nil);
|
||||
|
||||
// TODO: would be better to compare directly against symbols here,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
(list
|
||||
(cons 'and
|
||||
(lambda (expr rename compare)
|
||||
(cond ((null? (cdr expr)))
|
||||
(cond ((null? (cdr expr))) ;; TODO (?): #t)
|
||||
((null? (cddr expr)) (cadr expr))
|
||||
(else (list (rename 'if) (cadr expr)
|
||||
(cons (rename 'and) (cddr expr))
|
||||
|
|
16
test2.scm
16
test2.scm
|
@ -26,7 +26,19 @@
|
|||
(cons (rename 'and) (cddr expr))
|
||||
#f))))))
|
||||
|
||||
(write
|
||||
(test 1 2 3))
|
||||
(define-syntax or
|
||||
(er-macro-transformer
|
||||
(lambda (expr rename compare)
|
||||
(cond ((null? (cdr expr)) #f)
|
||||
((null? (cddr expr)) (cadr expr))
|
||||
(else
|
||||
(list (rename 'let) (list (list (rename 'tmp) (cadr expr)))
|
||||
(list (rename 'if) (rename 'tmp)
|
||||
(rename 'tmp)
|
||||
(cons (rename 'or) (cddr expr)))))))))
|
||||
|
||||
(write (test 1 2 3))
|
||||
(write (or 1 2 3 'or))
|
||||
(write (or #f 2 3 'or))
|
||||
;(test 'done)
|
||||
'done
|
||||
|
|
Loading…
Add table
Reference in a new issue