title: Usage of DEFSETF
body: <p>It is just really hard to understand from a standard description, so:</p>
  
  <p>For instance, I'm trying to set a k-th position of some list (ls) to a specific value. Even have a function of my own, that gives acces to k-th elt.</p>
  
  <pre><code>(defun kth-elt (lst k)
   (cond ((&gt; 0 k) nil)
    ((equal 0 k) (car lst))
    ((&lt; 0 k) (kth-elt (cdr lst) (- k 1))))).
  </code></pre>
  
  <p>Also made a function, that updates that value.</p>
  
  <pre><code> (defun kth-upd (lst k new)
    (cond ((&gt; 0 k) nil)
      ((equal 0 k) (setf  (car lst) new))
      ((&lt; 0 k) (kth-upd (cdr lst) (- k 1) new))))
  </code></pre>
  
  <p>Now i can actually use that, but i wanna understand the difference between it and DEFSETF. Also I still do not understand. how to "teach" defsetf to use these. Thx for help.</p>