Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]



A clarification....

Foxpointe wrote:
Also, the function below doesn't need the list 'flattened' for the same reason?

(defun make-test-instance (field-list)
(apply 'make-instance 'test-class field-list))

In this case, the functions make-test-instance and apply never see the symbol field-list! They only see the runtime list value that had better be passed to make-test-instance.

The trick with writing macros is to keep clearly separate in your mind compile time vs run time, and to remember that outside the backquotes you are in compile time and just manipulating source code, inside the backquote you should be thinking about runtime and the values that will be bound to different variables then.

Again, the debugging statements outside the backquotes will help you get used to thinking about compile time.

kt

--
Cells: http://common-lisp.net/project/cells/

"And I will know my song well before I start singing." - Bob Dylan
.