my previous question ,clearly more, is :
(define-syntax for/bc
(syntax-rules (continue break)
((_ (init test incrmt) b1 ...)
(call/cc (lambda (break)
(let ()
init
(let loop ()
(when test
(call/cc (lambda (continue) b1 ...))
incrmt
(loop)))))))))
is there a way to make working this macro in a R6RS compatible way (i know
it is possible in Racket or with syntax features...)
to avoid error:
(for/bc ({i <+ 0} {i < 5} {i <- {i + 1}})
{x <+ 7}
(display x)
(newline)
(break))
;;; <stdin>:2:73: warning: possibly wrong number of arguments to `break'
7
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong number of arguments to #<procedure break (pred clist)>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
Damien