macros: add until

This commit is contained in:
hellerve 2019-11-22 13:10:36 +01:00
parent 6954642cad
commit 6bf45e16a6

View File

@ -342,3 +342,8 @@ The expression must be evaluable at compile time.")
(doc gensym "generates symbols dynamically as needed.")
(defndynamic gensym []
(gensym-with 'gensym-generated))
(doc until "executes `body` until the condition `cnd` is true.")
(defmacro until [cnd body]
(list 'while (list 'not cnd)
body))