title: Initializing slots based on other slot values in Common Lisp Object System class definitions
body: <p>In my class definition, I want to initialize one slot based on the value of another slot.  Here is the sort of thing I would like to do:</p>
  
  <pre><code>(defclass my-class ()
    ((slot-1 :accessor my-class-slot-1 :initarg slot-1)
     (slot-2 :accessor my-class-slot-2 :initform (list slot-1))))
  </code></pre>
  
  <p>However this doesn't compile:</p>
  
  <pre><code>1 compiler notes:
  
  Unknown location:
    warning: 
      This variable is undefined:
        SLOT-1
  
    warning: 
      undefined variable: SLOT-1
      ==&gt;
        (CONS UC-2::SLOT-1 NIL)
  
  
  Compilation failed.
  </code></pre>
  
  <p>Is there a way to do this?</p>