fix HtDP advanced docs for random

svn: r17470
This commit is contained in:
Matthew Flatt 2010-01-03 18:04:44 +00:00
parent 9d7607c229
commit 1e2cb09f39
2 changed files with 7 additions and 3 deletions

View File

@ -66,6 +66,6 @@
procedures
(all-from-except intermediate: lang/htdp-intermediate-lambda procedures
cons list* append)
cons list* append random)
(all-from advanced: lang/private/advanced-funs procedures))
)

View File

@ -11,6 +11,12 @@
(provide-and-document
procedures
("Numbers: Integers, Rationals, Reals, Complex, Exacts, Inexacts"
(random (case->
(integer -> integer)
(-> (and/c real inexact? (>/c 0) (</c 1))))
"to generate a random natural number less than some given integer, or to generate a random inexact number between 0.0 and 1.0 exclusive"))
("Reading and Printing"
(with-input-from-file (string (-> any) -> any)
@ -55,8 +61,6 @@
"to produce the first element on the list whose first is equal? to v; otherwise it produces false"))
("Misc"
(random (-> (and/c real inexact? (>/c 0) (</c 1)))
"to generate a random number between 0 and 1 (excl).")
(gensym (-> symbol?)
"to generate a new symbol, different from all symbols in the program")
(sleep (-> positive-number void)