I am doing a small project just for fun, and I have added support evalto facilitate debugging. But later I discovered a problem:
eval
(let ((x 1)) (eval (1+ x))) (defun foo (x form) (eval form)) (foo 1 '(1+ x))
The code above will not work. Can anyone explain why and how it works? Many thanks.
First though
(let ((x 1)) (eval (1+ x)))
, (, , -), , , . eval , , . eval 2 - "" ( ) 2.
2
(defun foo (x form) (eval form))
. , - / . (, eval) , .
:
(defun foo (x form) (declare (special x)) (eval form))
lisp, x .
x
Source: https://habr.com/ru/post/1570906/More articles:Как получить имя переменной ответа из summary.glm - rWhat to replace MethodInvokingTimerTaskFactoryBean with Spring 4? - javaThe for-loop variable violates the loop limit - for-loopLet, eval, and quote behavior - lispAndroid Storage Access Framework - launch selection for custom file type - androidSelect2 Programmatically set the search conditions and open the drop-down list with the corresponding results (without ajax calls) - javascriptIs there a basic definition of higher order logic, as in HOL, Isabelle, etc.? - logicEclipse shows errors in the pom.xml file: cvc-datatype-valid.1.2.1: '$ {MYVAR}' is not a valid value for 'boolean' - eclipsewhy the javascript variable is not changed in all external JS files - javascriptValid Maven pom.xml when boolean is a property - javaAll Articles