guile-user
[Top][All Lists]
Advanced

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

Re: built-in procedural logical operator


From: Alex Vong
Subject: Re: built-in procedural logical operator
Date: Wed, 2 Sep 2015 01:13:44 +0800

2015-09-02 0:21 GMT+08:00, David Kastrup <address@hidden>:
> From (srfi srfi-1):
>
> (and ...) -> (every identity ...
> (or ...) -> (any identity ...
> (define (list-of-string? lst) (every string? lst))
>
> Of course, this definition returns #t for '() while your definition
> returns #f for '().  I'd argue the former is more correct.  But of
> course you can just write
> (define (list-of-string lst) (and (pair? lst) (every string? lst)))
> if you want the latter.

Thanks, this is exactly what I need. I love the name "every" and
"any", they sound very appropriate.

Cheers,
Alex



reply via email to

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