home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / scheme / 2827 < prev    next >
Encoding:
Internet Message Format  |  1992-12-25  |  1.2 KB

  1. Path: sparky!uunet!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: applying or
  5. Date: 25 Dec 1992 18:22:20 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 22
  8. Message-ID: <1hfjgsINN3bm@early-bird.think.com>
  9. References: <BztJDI.1J1@malihh.hanse.de>
  10. NNTP-Posting-Host: gandalf.think.com
  11.  
  12. In article <BztJDI.1J1@malihh.hanse.de> clu@malihh.hanse.de (Carsten Lutz) writes:
  13. >1. How can I pass a list of arguments to "or" ? apply doesn't work and I don't
  14. >   see another way.
  15.  
  16. You already answered this in your second posting: wrap it into a function
  17. of your own.
  18.  
  19. >2. Which where the criteria for choosing syntactic keywords. E.g. why are
  20. >   "or" and "and" syntactic keywords but "+" or "-" are not ?
  21.  
  22. Because "or" and "and" are required to perform "short circuit" evaluation,
  23. i.e. they only evaluate enough arguments to determine the result.  "+" and
  24. "-" are ordinary functions, whose arguments are always evaluated.
  25.  
  26. >I should mention my version of scheme:
  27.  
  28. Why?  Your question is about the language, not your implementation.
  29. -- 
  30. Barry Margolin
  31. System Manager, Thinking Machines Corp.
  32.  
  33. barmar@think.com          {uunet,harvard}!think!barmar
  34.