Re: call/cc does not return a value

2024-09-13 Thread Damien Mattei
well... when i test it in R6RS only your solution works, let and let-syntax are no more interchangeable and all the stuff with kwd and syntax must be keep :-O at least in Racket/R6RS , not tested in Guile/R6RS: (define-syntax for (lambda (stx) (syntax-case stx () ((kwd (init test i

Re: call/cc does not return a value

2024-09-13 Thread Mikael Djurfeldt
(Well, I thought the main reason why it didn't return a value was (escape) in the old code, i.e., the continuation is called without arguments.) On Fri, Sep 13, 2024 at 11:16 AM Damien Mattei wrote: > > hello Mikael, > > you remark help because ,even if 'let' and 'let-syntax' seems interchangeabl

Re: call/cc does not return a value

2024-09-13 Thread Damien Mattei
hello Mikael, you remark help because ,even if 'let' and 'let-syntax' seems interchangeable here, there was indeed a problem with syntax i did not write myself the macro originally and when comparing with def.scm that allow returning value from a function there was a difference, there was no u

Re: call/cc does not return a value

2024-09-13 Thread Mikael Djurfeldt
Hi Damien, Maybe I'm missing something, but shoudn't it be: (define-syntax for (lambda (stx) (syntax-case stx () ((kwd (init test incrmt) body ...) (with-syntax ((BREAK (datum->syntax (syntax kwd) 'break)) (CONTINUE (datum->syntax (syntax kwd) 'continue)))

call/cc does not return a value

2024-09-12 Thread Damien Mattei
hello, i believed call/cc allowed to return value but i have this macro and i can use continuation, but the value is not passed to the continuation: (define-syntax for (lambda (stx) (syntax-case stx () ((kwd (init test incrmt) body ...) (with-syntax ((BREAK (datum->syntax