$ cat opt.scm (module foo () (import chicken scheme) (define foo (let ((buf '())) (lambda (#!optional bar) (if bar (set! buf (cons bar buf)) buf)))) (define xxx (append (foo) '(1))) ) $ csc -S opt.scm Warning: at toplevel: (opt.scm:12) in procedure call to `append', expected argument #1 of type `list', but was given an argument of type `undefined'