Closed alexmozaidze closed 10 months ago
Turns out this works fine already, you just need to quote the symbol for the special.
(lambda dec-inc-boilerplate [f idx ?by]
`(set ,idx (,f ,idx ,(or ?by 1))))
(lambda -- [idx ?by]
(dec-inc-boilerplate `- idx ?by))
(lambda ++ [idx ?by]
(dec-inc-boilerplate `+ idx ?by))
Welp, that's an oopsie on my side. Thanks for pointing it out!
Haha no worries.
It would be nice to have. I've yet to find myself in a strong need for it, but it would remove some boilerplate from small macros such as the following example:
Right now, one must copy-paste the body of
dec-inc-boilerplate
into those other macros and have the form invocation baked-in:Again, not the end of the world, but would be nice to have ^^