diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/place.tl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index 74b5b01d..4d5e63dd 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -133,6 +133,12 @@ (defmacro slet (bindings :env e . body) (sys:r-s-let-expander bindings body e [orf constantp bindable])) +(defmacro alet (bindings :env e . body) + (let ((exp-bindings (mapcar (aret ^(,@1 ,(macroexpand @2 e))) bindings))) + ^(,(if [all exp-bindings [orf constantp bindable] second] + 'symacrolet 'let) + ,exp-bindings ,*body))) + (defmacro with-gensyms (syms . body) ^(let ,(zip syms (repeat '((gensym)))) ,*body)) |