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

*To*: T-Users@YALE.ARPA*Subject*: bug in (ANY ... )*From*: Eric Mohr <Mohr@YALE.ARPA>*Date*: Tue ,6 Nov 84 15:36:07 EDT

Procedures ANY? and ANY have a bug, at least on the zoo, in that they will only work with unary predicates: > (any eq? '(a b c) '(1 2 3)) ** Error: wrong number of arguments to procedure (ANY #{Procedure 14 EQ?} (A B C) (1 2 3)) The following procedure works properly and may be used to shadow the official T procedures: (DEFINE (any pred? . L) (COND ( (null? (car L)) nil) ( (apply pred? (map car L)) T) (ELSE (apply any (cons pred? (map cdr L))) ) ) ) This problem was discovered in an attempt to use the FOR package to step through two lists simultaneously: > (FOR (x IN '(a b c)) (y IN '(1 b 3)) (UNTIL (eq? x y)) ) ** Error: wrong number of arguments to procedure (ANY #{Procedure 16} (A B C) (1 B 3)) Any information on a more permanent solution to this problem would be appreciated. -Rick Mohr

- Prev by Date:
**Re: Calling C from T in the Apollos ?** - Next by Date:
**Re: bug in (ANY ... )** - Previous by thread:
**Re: Calling C from T in the Apollos ?** - Next by thread:
**Re: bug in (ANY ... )** - Index(es):