Hello,
I am playing a bit with Guile and proceed along
https://scheme.com/tspl4/start.html#./start:h2
In a Scheme, exercise 2.2.3o
((car (list + - * /)) 2 3)
evaluates to 5. Of course, in Common Lisp this has to be written as
(funcall (car (list (function +)
(function -)
(function *)
(function /)))
2 3)
or, using reader macros, as
(funcall (car (list #'+ #'- #'* #'/)) 2 3)
or even, but not strictly identical anymore,
(funcall (car '(+ - * /)) 2 3)
However, at one point I managed to paste an expression into the wrong
REPL, SBCL instead of Guile, and got
(list + - * /)
evaluated by SBCL as
(NIL (LIST + - * /) NIL NIL)
Oops?! Even better, when I tried this again immediately, I got
((LIST + - * /) (LIST + - * /) (NIL (LIST + - * /) NIL NIL)
((NIL (LIST + - * /) NIL NIL)))
So there seems to be some "history expansion" going on (for "*"). But
how to explain the first result with the NILs and the expression itself?
Pointers welcome!
Axel
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)