home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!wupost!psuvax1!ward
- From: ward@math.psu.edu (Brian Ward)
- Subject: Re: applying or
- Message-ID: <BztyDu.KDE@cs.psu.edu>
- Sender: news@cs.psu.edu (Usenet)
- Nntp-Posting-Host: fourier.math.psu.edu
- Organization: The Bill and Ted Society of Computer Science
- References: <BztJDI.1J1@malihh.hanse.de>
- Date: Fri, 25 Dec 1992 19:34:41 GMT
- Lines: 15
-
- clu@malihh.hanse.de (Carsten Lutz) writes:
- |1. How can I pass a list of arguments to "or" ? apply doesn't work and I don't
- | see another way.
-
- I had this problem once. (define a-or
- (lambda x (cond
- ((null? x) ())
- ((or (car x)) #t)
- (#t (apply a-or (cdr x))))))
- worked ok for what I had to do with it, at least, but that's from memory
- and I didn't test the above, so I don't know it it's right or not.
- (a-or = applyable-or) seems slow, though.
-
- -brian
-
-