title: Pushing new elements into a new empty list using Lisp
body: <p>The below function tries to update <code>*features-list*</code> With the element feature. 
  <em>feature-list</em> is defined as a global variable.</p>
  
  <p>When I run the function against an empty <code>*feature-list*</code>,I get an error Message </p>
  
  <pre><code>The object is a CONDITION of type TYPE-ERROR.
  DATUM: NIL
  EXPECTED-TYPE: CONS
  </code></pre>
  
  <p>However, when I initialize the <code>*feature-list*</code>, the function executes properly.</p>
  
  <pre><code>(defun update-feature-list (feature)
    (let ((feature-index))
      (setq feature-index (position feature *features-list*))
      (cond ((equal feature-index nil) 
             (push feature (cdr (last *features-list*)))
             (setq feature-index (position feature *features-list*))))))
  </code></pre>