Eta expand natural?

Doing this eta expansion has the advantage that error messages
will point to `natural?` rather than `exact-nonnegative-integer?`
This commit is contained in:
Leif Andersen 2017-03-03 09:58:19 -05:00
parent eca457e886
commit 1cbd75436b

View File

@ -47,7 +47,8 @@
(define (nonnegative-integer? x)
(and (integer? x) (not (negative? x))))
(define natural? exact-nonnegative-integer?)
(define (natural? x)
(exact-nonnegative-integer? x))
;; z^2
(define (sqr z)