support 'else' syntax in cond
This commit is contained in:
parent
15e95f82da
commit
f051de77c5
|
@ -53,9 +53,11 @@
|
||||||
(let ((clauses (cdr expr)))
|
(let ((clauses (cdr expr)))
|
||||||
(if (null? clauses)
|
(if (null? clauses)
|
||||||
#f
|
#f
|
||||||
(list (r 'if) (caar clauses)
|
(if (compare (r 'else) (caar clauses))
|
||||||
(cons (r 'begin) (cdar clauses))
|
(cons (r 'begin) (cdar clauses))
|
||||||
(cons (r 'cond) (cdr clauses))))))))
|
(list (r 'if) (caar clauses)
|
||||||
|
(cons (r 'begin) (cdar clauses))
|
||||||
|
(cons (r 'cond) (cdr clauses)))))))))
|
||||||
|
|
||||||
(define-syntax and
|
(define-syntax and
|
||||||
(er-macro-transformer
|
(er-macro-transformer
|
||||||
|
|
Loading…
Reference in New Issue