title: Scheme streams and circular lists
body: <p>In Scheme/Lisp I am trying to make a function that converts a list into a circular list. Therefore, I believe I need to construct an infinite stream in which the tail of the list points to the head of the list.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>(define (rotate-list l1 l1copy)
    (if (null? (force (cdr l1)))
        (cons (car l1) (delay l1copy)))
        (cons (car l1) (delay (rotate-list (force (cdr l1)) l1copy))))
  </code></pre>
  
  <p>All help is greatly appreciated.</p>