I'm writing an implementation of SRFI-1 in Javascript (just for fun) and I
have a question about SRFI-1's any procedure. In the docs it says that
"(any) does not return a simple boolean (#t or #f), but a general value",
however it also says that any must be called with a "procedure taking n
argume
On Nov 28, 2011, at 9:01 PM, Nick Zarr wrote:
> I've been testing my implementation against Chicken for correctness and
> here's what I get on Chicken:
>
> #;2> (any (lambda (x) (if (even? x) x)) '(1 2 3))
> #;3> (any (lambda (x) (even? x)) '(1 2 3))
> #t
> #;4> (any even? '(1 3 5))
> #f
>
> Fo
Nick Zarr scripsit:
> I'm writing an implementation of SRFI-1 in Javascript (just for fun) and I
> have a question about SRFI-1's any procedure. In the docs it says that
> "(any) does not return a simple boolean (#t or #f), but a general value",
> however it also says that any must be called with
On Tue, Nov 29, 2011 at 12:05 AM, John Cowan wrote:
> Nick Zarr scripsit:
>
> > I'm writing an implementation of SRFI-1 in Javascript (just for fun) and
> I
> > have a question about SRFI-1's any procedure. In the docs it says that
> > "(any) does not return a simple boolean (#t or #f), but a ge
* Nick Zarr [29 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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/29/2011 12:23 PM, Christian Kellermann wrote:
> Actually the result of the else branch of (if (even? x) x) is
> undefined.
Aye. A single-armed "if" is only really useful for conditionalising code
performed for its side effects, as the return va