Email or username:

Password:

Forgot your password?
Top-level
Devil Lu Linvega

@edavies 12 will try to find a function with that name, (QUOTE 12) is the value.

2 comments
Ed Davies

@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.

Devil Lu Linvega

@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.

Go Up