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

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!mintaka.lcs.mit.edu!zurich.ai.mit.edu!jaffer
  3. From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
  4. Subject: Re: applying or
  5. In-Reply-To: clu@malihh.hanse.de's message of 25 Dec 92 14:10:29 GMT
  6. Message-ID: <JAFFER.93Jan1230751@camelot.ai.mit.edu>
  7. Sender: news@mintaka.lcs.mit.edu
  8. Organization: M.I.T. Artificial Intelligence Lab.
  9. References: <BztJDI.1J1@malihh.hanse.de>
  10. Date: Sat, 2 Jan 1993 04:07:51 GMT
  11. Lines: 12
  12.  
  13. An applicable version of or is defined in comlist.scm in SLIB.  The
  14. definitions follow:
  15.  
  16. (define (and? . args)
  17.   (cond ((null? args) #t)
  18.     ((car args) (apply and? (cdr args)))
  19.     (else #f)))
  20.  
  21. (define (or? . args)
  22.   (cond ((null? args) #f)
  23.     ((car args) #t)
  24.     (else (apply or? (cdr args)))))
  25.