#| -*-Scheme-*-
-$Id: utils.scm,v 1.13 1995/02/20 18:24:41 adams Exp $
+$Id: utils.scm,v 1.14 1995/02/20 20:13:39 adams Exp $
Copyright (c) 1994 Massachusetts Institute of Technology
(lambda (rator)
(and (pseudo-simple-operator? rator)
(operator/satisfies? rator '(SIDE-EFFECT-FREE))))))
+
+(define (form/number? form)
+ (and (QUOTE/? form)
+ (number? (quote/text form))
+ (quote/text form)))
\f
(define (binding-context-type keyword context bindings)
(if (or (eq? keyword 'LETREC)
(set! unmap-careful (lambda (v) (if (eq? v careful-false) '#F v))))
(define (careful/quotient x y)
- (if (and (number? x) (number? y) (not (zero? y))
+ (if (and (number? x) (number? y) (not (zero? y)))
(quotient x y)
(careful-error "quotient: Domain error" x y)))
(define (careful/remainder x y)
- (if (and (number? x) (number? y) (not (zero? y))
+ (if (and (number? x) (number? y) (not (zero? y)))
(remainder x y)
(careful-error "remainder: Domain error" x y)))
(define (careful// x y)
- (if (and (number? x) (number? y) (not (zero? y))
+ (if (and (number? x) (number? y) (not (zero? y)))
(/ x y)
(careful-error "/: Domain error" x y)))
((QUOTE/? program)
(+ size 1))
(else
- (walk (car program) (walk (cdr program) (+ size 1)))))))
\ No newline at end of file
+ (walk (car program) (walk (cdr program) (+ size 1)))))))