Update docs for random

db4
Doug Coleman 2010-01-14 12:45:30 -06:00
parent 70fb7ba164
commit 7dc60e3625
1 changed files with 2 additions and 3 deletions

View File

@ -19,9 +19,8 @@ HELP: random-bytes*
{ $description "Generates a byte-array of random bytes." } ; { $description "Generates a byte-array of random bytes." } ;
HELP: random HELP: random
{ $values { "seq" sequence } { "elt" "a random element" } } { $values { "obj" object } { "elt" "a random element" } }
{ $description "Outputs a random element of the input sequence. Outputs " { $link f } " if the sequence is empty." } { $description "Outputs a random element of the input object, or outputs " { $link f } " if the object contains no elements." }
{ $notes "Since integers are sequences, passing an integer " { $snippet "n" } " outputs an integer in the interval " { $snippet "[0,n)" } "." }
{ $examples { $examples
{ $unchecked-example "USING: random prettyprint ;" { $unchecked-example "USING: random prettyprint ;"
"10 random ." "10 random ."