Closed masak closed 9 months ago
Good news! I got it right, sort of:
> (let let '`(let let ',let ,let) `(let let ',let ,let))
(let let (quote #1=(bquote (let let (quote (comma let)) (comma let)))) #1)
> (= (let let '`(let let ',let ,let) `(let let ',let ,let)) '(let let (quote #1=(bquote (let let (quote (comma let)) (comma let)))) #1))
t
> (= (let let '`(let let ',let ,let) `(let let ',let ,let)) '(let let '`(let let ',let ,let) `(let let ',let ,let)))
t
Note the thing with the shared pair. But equality holds whether we take the sharing into account or not.
This cliki page has an example, apparently from Bawden's article about quasiquotation (go figure):
Apparently, in Common Lisp, this is a quine — that is, the expression evaluates to itself.
Include a Bel test that does the same thing. Naturally, since Bel's
let
macro has a syntax with slightly fewer parentheses, we need to make the corresponding modifications to the quine. I think this would do it:That is, we've kept the parentheses around the
let
combinations which are actuallylet
declarations, but removed the two types in Common Lisp's special operatorlet
which (a) group the declarations together in a group and (b) group individual var/init-form pairs together as units.