[Top][All Lists]

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

Re: Problem with cond macro.

From: Dirk Herrmann
Subject: Re: Problem with cond macro.
Date: Thu, 25 Apr 2002 23:59:31 +0200 (MEST)

On Wed, 17 Apr 2002, Keith Wright wrote:

> > From: address@hidden (Julian v. Bock)
> > 
> > >>>>> "PV" == Panagiotis Vossos <address@hidden> writes:
> > 
> > PV> Ok, I just started studying macros, so I might be missing
> > PV> something obvious, but the following example from r5rs doesn't
> > PV> work correctly with guile:
> > 
> > guile> (let ((=> #f))
> > guile>       (cond (#t => 'ok)))
> > guile> In expression (cond (#t => #)): 
> > guile> Wrong type to apply: ok ABORT:
> R5RS> As an example. if LET and COND are defined as in section 7.3
> R5RS> then they are hygenic (as required) and the following is
> R5RS> not an error.
> R5RS>         <above example>
> I take this to mean that the behaviour shown is required, and
> that furthermore the hygenic macro system exhibits the required
> behaviour.  Thus the built-in COND should work in the same
> way as the example implementation given in the R5 Report,
> even though it may be implemented more (or less) efficiently.

Well, I'm not sure I understand all of this:  What about the following:

(define => #f)
(cond (#t => 'ok))

Should this also deliver 'ok ?  It doesn't seem to with the current
implementation of syncase.

Best regards,
Dirk Herrmann

reply via email to

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