title: Circular lists in Racket
body: <p>It has been a while since i last programmed in Racket.
  Now i wanted to make a circular list in Racket as follows :</p>
  
  <pre><code>(define x (list 1 2))
  (set-mcdr! (cdr x) x)
  </code></pre>
  
  <p>But this gives rises to the error : </p>
  
  <pre><code>set-mcdr!: contract violation
  expected: mpair?
  given: '(2)
  argument position: 1st
  other arguments...:
   '(1 2)
  </code></pre>
  
  <p>I'm surprised because <code>(cddr x)</code> is <code>'()</code> so I don't understand why he tells me "expected: mpair?" as <code>'(2)</code> is a pair (with <code>cdr</code> the empty list).</p>
  
  <p>Thanks for your help!</p>