Re: return macro

2021-09-30 Thread Damien Mattei
i do not remember well the technic of this commented code, in this case note that it is 'break' keyword that cause the current continuation being called and escaping from the loop to the continuing code... there is no 'return' here but 'break'. Damien On Thu, Sep 30, 2021 at 5:38 AM adriano wrote

Re: return macro

2021-09-30 Thread Stefan Israelsson Tampe
used write a lambda using it prepending a ,opt and you will see what the macros expand to like ,opt (lambda (x) (let/ec ret (when x (ret x)) (+ x x))) On Thu, Sep 30, 2021 at 10:46 AM Damien Mattei wrote: > i do not remember well the technic of this commented code, in this case > note that it i

Re: return macro

2021-09-30 Thread dsmich
From: "adriano" > (import (ice-9 control)) > > (define (test x) > (let/ec return > (cond > ((= x 3) (return 7)) > ((= x 2) (return 5) > What does this return (defined with let/ec) do ? > In the orevious versions I could see the call to call/cc so I could > (somewhat) figure out the

Re: Exception handler installed when handling a continuable exception

2021-09-30 Thread Vivien Kraus via General Guile related discussions
Hello, I finally figured it out: Le mercredi 25 août 2021 à 21:08 +0200, Maxime Devos a écrit : > This also happens without #:continuable?. > Here's a simpler test case: > > (with-exception-handler > (lambda (exn) > (catch #t > (lambda () (error "to be caught")) > (lambda e (pk