[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

macros...



Hello --

I am having a problem concerning parameters and macros...

I ultimately want to define this function as a macro:

(defun b-tree-insert (tree foo)
  (cond ((not (boundp tree))
         (list 'setf tree
               (list 'make-node foo)))
        ((null tree)
         (list 'setf tree
               (list 'b-tree-insert-aux tree foo)))
        (t
         (list 'b-tree-insert-aux tree foo))))
         

Here are the definitions of the parameters I am passing:

? (setf zeta nil)
nil
? (setf zeta nil)
nil
? zeta
nil
? (setf foo '(23 (e 1) (g 1)))
(23 (e 1) (g 1))
? (b-tree-insert laos foo)
(setf nil (b-tree-insert-aux nil (23 (e 1) (g 1))))

      ^^^  

It is here where I want "zeta" and not "nil", but for some reason I can't get
around this.  I was thinking that maybe I could somehow access the name slot
of the variable "zeta", but I can't seem to find the function to access it.
Suggestions?

-- John