Ciao,
let's look at this script:
(import (scheme)
(chicken pretty-print))
(define (doit)
(call-with-current-continuation
(lambda (escape)
(pretty-print 'before)
(pretty-print escape)
(escape)
(pretty-print 'after)
(values))))
(doit)
I compile and run it under CHICKEN 5.1.0:
$ csc -O1 -o demo demo.scm && ./demo
before
#<procedure (continuation . results)>
Error: bad argument count - received 0 but expected 1
Call history:
demo.scm:33: doit
demo.scm:25: scheme#call-with-current-continuation
demo.scm:27: chicken.pretty-print#pretty-print
demo.scm:28: chicken.pretty-print#pretty-print
demo.scm:29: escape <--
I do not understand why some place expects 1 argument. The problem goes
away if I replace:
(escape)
with:
(escape 1)
TIA
--
Marco Maggi
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users