home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mlb.semi.harris.com!travis.csd.harris.com!grouper!!brent
- From: brent@ssd.csd.harris.com (Brent Benson)
- Newsgroups: comp.lang.scheme
- Subject: Re: Summary. Interpreters are faster than I thought
- Message-ID: <BRENT.92Dec18111727@amber.ssd.csd.harris.com>
- Date: 18 Dec 92 16:17:27 GMT
- References: <4094@mitech.com>
- Sender: news@grouper.mkt.csd.harris.com (Network News)
- Organization: Harris Computer Systems
- Lines: 24
- In-Reply-To: gjc@mitech.com's message of 17 Dec 92 12:21:03 GMT
-
- gjc@mitech.com (George J. Carrette) writes:
-
- > So here is another version of fib that uses binary arithmetic
- > implemented as lists of symbols.
-
- The B< function is buggy. It requires (cdr '()) to return '() and
- (if #f foo) to return #f. Here is a version that should work in R4RS
- implementations.
-
- (define (b< x y)
- (cond
- ((null? x) (not (null? y)))
- ((null? y) #f)
- (else (or (b< (cdr x) (cdr y))
- (if (equal? (cdr x) (cdr y))
- (if (eq? (car x) 'A)
- (eq? (car y) 'B)
- #f)
- #f)))))
-
-
- --
- Brent Benson
- Harris Computer Systems
-