chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Correct behavior of SRFI-1 any


From: Christian Kellermann
Subject: Re: [Chicken-users] Correct behavior of SRFI-1 any
Date: Tue, 29 Nov 2011 13:23:00 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Nick Zarr <address@hidden> [111129 13:15]:
> Thanks.  After reading the spec quite a few times and becoming more
> confused, it slipped my mind that (if (even? x) x) would return (void) and
> that it was a true value.  I assumed that Chicken was doing the right
> thing, thanks to you and Jim for pointing out my error!

Nitpicking ahead :)

Actually the result of the else branch of (if (even? x) x) is
undefined. CHICKEN happens to return (void), but don't rely on it.
I personally stick to the (and (even? x) x) check Jim mentioned
because you will always get a truth value. (void) is not Ã#f but
CHICKEN *could* just return #f for cases like this and still be
within specs...

Kind regards,

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 



reply via email to

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