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:
parent
eca457e886
commit
1cbd75436b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user