puzzle about EVAL and INTERN
Posted: Sun Mar 22, 2009 2:31 pm
As a newbie on Common Lisp with only experience with some homework in scheme, I'm trying out the "fun" functions like eval and intern. I can't understand why is below:
[33]> (eval (list (intern "+") 2 3))
5
[34]> (eval (list (intern "floor") 2 3))
*** - EVAL: undefined function |floor|
The following restarts are available:
USE-VALUE :R1 Input a value to be used instead of (FDEFINITION '|floor|).
RETRY :R2 Retry
STORE-VALUE :R3 Input a new value for (FDEFINITION '|floor|).
ABORT :R4 Abort main loop
Actually same error happens when I use some functions other than + - * /, is it because problems with package?
Thanks!
[33]> (eval (list (intern "+") 2 3))
5
[34]> (eval (list (intern "floor") 2 3))
*** - EVAL: undefined function |floor|
The following restarts are available:
USE-VALUE :R1 Input a value to be used instead of (FDEFINITION '|floor|).
RETRY :R2 Retry
STORE-VALUE :R3 Input a new value for (FDEFINITION '|floor|).
ABORT :R4 Abort main loop
Actually same error happens when I use some functions other than + - * /, is it because problems with package?
Thanks!