Add unless.

* module/mes/scm.mes (unless): New syntax.
This commit is contained in:
Jan Nieuwenhuizen 2016-12-20 15:48:10 +01:00
parent 8e1b25368b
commit 489d7c7f51

View file

@ -67,6 +67,10 @@
`(if ,expr
((lambda () ,@body))))
(define-macro (unless expr . body)
`(if (not ,expr)
((lambda () ,@body))))
(define-macro (do init test . body)
`(let loop ((,(caar init) ,(cadar init)))
(when (not ,@test)