mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Unless/when don't have alternate clause
This commit is contained in:
parent
35f0c486cd
commit
1d1cd8d61f
1 changed files with 2 additions and 4 deletions
|
@ -483,15 +483,13 @@
|
|||
(if (null? (cdr exp)) (error/loc "empty when" exp))
|
||||
(if (null? (cddr exp)) (error/loc "no when body" exp))
|
||||
`(if ,(cadr exp)
|
||||
((lambda () ,@(cddr exp)))
|
||||
#f))))
|
||||
((lambda () ,@(cddr exp)))))))
|
||||
(define-syntax unless
|
||||
(er-macro-transformer
|
||||
(lambda (exp rename compare)
|
||||
(if (null? (cdr exp)) (error/loc "empty unless" exp))
|
||||
(if (null? (cddr exp)) (error/loc "no unless body" exp))
|
||||
`(if ,(cadr exp)
|
||||
#f
|
||||
`(if (not ,(cadr exp))
|
||||
((lambda () ,@(cddr exp)))))))
|
||||
(define-syntax do
|
||||
(er-macro-transformer
|
||||
|
|
Loading…
Add table
Reference in a new issue