Skip to content
Discussion options

You must be logged in to vote

Interlisp EVAL and Interlisp compiled code don't create lexical contexts.

So (LET ((FOO 42)) (....))

doesn't create a lexical scope so there is nothing to close over.

If you wrap it in a CL:LAMBDA though you'll get lexical bindings
(CL:FUNCALL #'(CL:LAMBDA (&AUX (FOO 42)) (CL:INCF FOO))))

will return a lexical closure with the value of FOO captured (I changed it to INCF just to illustrate)

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@MattHeffron
Comment options

@RyanBurnside
Comment options

@RyanBurnside
Comment options

@pamoroso
Comment options

pamoroso Nov 8, 2025
Collaborator

@MattHeffron
Comment options

Comment options

You must be logged in to vote
1 reply
@RyanBurnside
Comment options

Comment options

You must be logged in to vote
2 replies
@RyanBurnside
Comment options

@RyanBurnside
Comment options

Answer selected by RyanBurnside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants