title: Common Lisp: error "CDR LST should be a lambda expression"
body: <p>I am doing a program which accepts one list and two atoms and replace atom-1 with atom-2 if atom-1 appears in list.<br>
  I am doing programming in a text editor using an Ubuntu system</p>
  
  <p>Below is my code:</p>
  
  <pre><code>#! /usr/bin/clisp
  
  (defun my-replace (lst x y)
    (cond
      ((eq lst nil) nil)
      ((eq (cdr lst) nil) nil)
      ((eq (car lst) x) (setq (car lst) y))
      ( t (my-replace ((cdr lst) x y)))))
  </code></pre>
  
  <p>When I try to execute this, Clisp shows this error:</p>
  
  <p><code>*** - SYSTEM::%EXPAND-FORM: (CDR LST) should be a lambda expression</code></p>
  
  <p>I am beginner in Lisp.<br>
  Please tell me how to solve this error.</p>