scheme: Wrong type argument in position
<p>I'd really appreciate it if some-one can help with this. I've been banging my head for a day trying to get this to work. I've searched the internet and reread the manual but I just don't understand.</p>

<pre><code>guile &lt;&lt; __EOF__

( define heading-list (list 'a 'b 'c)
)

(define (make-heading-list)
  ( let* ((mycond #t))
     ( if mycond
       ( set! 
           heading-list
           ( append (
               heading-list
               (list 'd)
             )
           )
       )
       ( display 'false)
    )
    heading-list
  )
)

(make-heading-list)
__EOF__  
</code></pre>

<p>When I run this, I get:</p>

<pre><code>ERROR: In procedure setter:
ERROR: In procedure setter: Wrong type argument in position 1: (a b c)
</code></pre>

<p>I know the formatting is non-std - I'll fix it when it works.</p>

<p>EDIT-----------------------------------------
Here is working code (hopefully reasonably formatted now):</p>

<pre><code>guile &lt;&lt; __EOF__

(define heading-list (list 'a 'b 'c))

(define (make-heading-list)
  (let* ((mycond #t))
        (if mycond
           (set!
               heading-list
               (append heading-list (list 'd)))
           (display 'false))
         heading-list))

(make-heading-list)
__EOF__
</code></pre>