home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.scheme
- Subject: Re: applying or
- Date: 25 Dec 1992 18:22:20 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 22
- Message-ID: <1hfjgsINN3bm@early-bird.think.com>
- References: <BztJDI.1J1@malihh.hanse.de>
- NNTP-Posting-Host: gandalf.think.com
-
- In article <BztJDI.1J1@malihh.hanse.de> 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.
-
- You already answered this in your second posting: wrap it into a function
- of your own.
-
- >2. Which where the criteria for choosing syntactic keywords. E.g. why are
- > "or" and "and" syntactic keywords but "+" or "-" are not ?
-
- Because "or" and "and" are required to perform "short circuit" evaluation,
- i.e. they only evaluate enough arguments to determine the result. "+" and
- "-" are ordinary functions, whose arguments are always evaluated.
-
- >I should mention my version of scheme:
-
- Why? Your question is about the language, not your implementation.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-