guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cond clause does not allow definitions


From: Pierpaolo Bernardi
Subject: Re: cond clause does not allow definitions
Date: Wed, 22 May 2024 23:07:46 +0200

On Wed, May 22, 2024 at 10:08 PM Jeronimo Pellegrini <j_p@aleph0.info> wrote:

> A: (cond (#t (define x 7) x))
> B: (cond (else (define x 7) x))
>
> | system      | A     | B     |
> |-------------|-------|-------|
> | Bigloo      | 7     | 7     |
> | Biwa        | 7     | 7     |
> | Chez        | error | 7     |
> | Chibi       | error | 7     |

In chez:

> (cond (else (define x 7) x))
7
> x
7

which looks like a bug to me. You may check if x is defined outside of
the cond expression in the other implementations which do not raise an
error too?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]