nonnegative-integer -> exact-nonnegative-integer

This commit is contained in:
Leif Andersen 2017-03-02 15:55:58 -05:00
parent 1ac2e77d00
commit 1ebb3d5ef3
3 changed files with 5 additions and 5 deletions

View File

@ -1299,7 +1299,7 @@ Returns @racket[#t] if @racket[x] is @racket[+inf.0], @racket[-inf.0], @racket[+
@racket[#t] for non-negative @racket[inexact?] integers.}
@defproc[(natural? [x any/c]) boolean?]{
An alias for @racket[nonnegative-integer?].}
An alias for @racket[exact-nonnegative-integer?].}
@; ----------------------------------------------------------------------
@close-eval[math-eval]

View File

@ -178,12 +178,12 @@
;; natural?
(test #t natural? 1)
(test #t natural? 1.0)
(test #t natural? 3/3)
(test #t natural? 0)
(test #t natural? -0)
(test #t natural? 0.0)
(test #t natural? -0.0)
(test #f natural? 1.0)
(test #f natural? 0.0)
(test #f natural? -0.0)
(test #f natural? 3/2)
(test #f natural? 0.5)
(test #f natural? -5)

View File

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