(defmacro lets ((&rest substs) &body body)
"Did someone write let-but-its-substs already? #commonLisp #macro #programming "
(loop
:for body1 := body :then body2
:for body2
:=
(loop
:for new-body := body1
:then (subst new old new-body :test 'equal)
:for (old new) :in substs
:finally (return new-body))
:when (equal body1 body2)
:return (append '(progn) body1)))
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 09-Jan-2025 16:48:51 JST screwlisp