[plt-scheme] eval and define
From: nik gaffney (nik at fo.am)
Date: Thu Dec 28 13:05:27 EST 2006 |
|
> Actually, Common Lisp does the same thing -- this is using Allegro:
>
> | CL-USER(1): (defvar fcn (gensym "p-"))
> | FCN
> | CL-USER(2): fcn
> | #:|p-111|
> | CL-USER(3): (eval `(defun ,fcn () (+ 1 1)))
> | #:|p-111|
> | CL-USER(4): (#:|p-111|)
> | Error: attempt to call `#:|p-111|' which is an undefined function.
> | [condition type: UNDEFINED-FUNCTION]
>
> If the original implementation didn't throw an error then it is
> broken.
yes you're right. looks like its a problem with slime, as the example gives an
error when run from the shell, yet 'works' when using slime. . ..