integer is now natural, Closes PR14156

This commit is contained in:
Matthias Felleisen 2013-11-17 12:24:51 -05:00
parent ff958867d5
commit b11c485523
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@
*bsl))
("Numbers: Integers, Rationals, Reals, Complex, Exacts, Inexacts"
@defproc[(random [x integer]) integer]{
@defproc[(random [x natural]) natural]{
Generates a random natural number less than some given integer
In ASL: @racket[random] generate a random inexact number between 0.0
and 1.0 exclusive when applied to no argument.
@ -399,7 +399,7 @@
}))
#|
@defproc[(random (case-> (integer -> integer) (-> (and/c real inexact? (>/c 0) (</c 1)))]{
@defproc[(random (case-> (natural -> natural) (-> (and/c real inexact? (>/c 0) (</c 1)))]{
Generates a random natural number less than some given integer, or to
generate a random inexact number between 0.0 and 1.0 exclusive.}

View File

@ -376,8 +376,8 @@
Lookups the character that corresponds to the given exact integer in the ASCII table (if any).
@interaction[#:eval (bsl) (integer->char 42)]
}
@defproc[((beginner-random random) [x integer]) integer]{
Generates a random natural number less than some given exact integer.
@defproc[((beginner-random random) [x natural]) natural]{
Generates a random natural number less than some given exact natural.
@interaction[#:eval (bsl) (random 42)]
}
@defproc[(current-seconds) integer]{