如果有人可以提供帮助,我将不胜感激。我已经敲了一天的头,试图让它发挥作用。我已经搜索了互联网并重新阅读了手册,但我就是不明白。
guile << __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__
当我运行它时,我得到:
ERROR: In procedure setter:
ERROR: In procedure setter: Wrong type argument in position 1: (a b c)
我知道格式是非标准的 - 我会在它工作时修复它。
编辑----------------------------------------- 这是工作代码(希望格式合理现在):
guile << __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__