@edavies 12 will try to find a function with that name, (QUOTE 12) is the value.
Top-level
2 comments
@edavies yeah for sure, I'm familiar with how lisp and scheme does that. This is quite a bit different. I might write a prelude that changes the compiler to handle this more gracefully, but as defined in Lispkit, pure lisp doesn't have any helpers for that. |
@neauoire That's a big divergence from most Lisps, I think. They only look for a function at the head of a list. Without quote they'd resolve a symbol later in the list to its value but wouldn't try to execute it.
The very first bit of code shown in SICP (so Scheme) is
(+ 137 349)
.E.g.,
(MUL (QUOTE 2) (ADD (QUOTE 1) X))
could be more-simply written as(MUL 2 (ADD 1 X))
with the same effect.