home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / scheme / 2828 < prev    next >
Encoding:
Text File  |  1992-12-25  |  870 b   |  28 lines

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