Hi!

Josep Portella Florit <[email protected]> writes:

> The my-or example macro in the documentation has a subtle bug.
>
>           (letrec-syntax ((my-or
>                            (syntax-rules ()
>                              ((my-or)
>                               #t)
>                              ((my-or exp)
>                               exp)
>                              ((my-or exp rest ...)
>                               (let ((t exp))
>                                 (if exp
>                                     exp
>                                     (my-or rest ...)))))))
>             (my-or #f "rockaway beach"))
>
> In the third rule t is bound to exp, presumably to use t instead of exp
> to prevent evaluating exp multiple times, but t is never used and exp is
> used again.

Indeed!  This was reported shortly after the 2.0.9 release, and has been
fixed in the stable-2.0 branch.

http://bugs.gnu.org/14203
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=e006d87ba5942b6e49b39b951413dfe63785a398

    Thanks!
      Mark



Reply via email to