random: minor doc improvement with $snippet.

factor-shell
John Benediktsson 2017-09-11 15:47:39 -07:00
parent 8ab4e94475
commit 705e7018c8
1 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ HELP: random-32*
HELP: random-bytes*
{ $values { "n" integer } { "obj" "a random number generator" } { "byte-array" "a sequence of random bytes" } }
{ $description "Generates a byte-array of n random bytes." } ;
{ $description "Generates a byte-array of " { $snippet "n" } " random bytes." } ;
HELP: random
{ $values { "obj" object } { "elt" "a random element" } }
@ -38,7 +38,7 @@ HELP: random-32
HELP: random-bytes
{ $values { "n" integer } { "byte-array" "a sequence of random bytes" } }
{ $description "Generates a byte-array of n random bytes." }
{ $description "Generates a byte-array of " { $snippet "n" } " random bytes." }
{ $examples
{ $unchecked-example "USING: prettyprint random ;"
"5 random-bytes ."
@ -80,11 +80,11 @@ HELP: random-units
HELP: random-bits
{ $values { "numbits" integer } { "n" "a random integer" } }
{ $description "Outputs an random integer n bits in length." } ;
{ $description "Outputs a random integer " { $snippet "numbits" } " bits in length." } ;
HELP: random-bits*
{ $values { "numbits" integer } { "n" "a random integer" } }
{ $description "Returns an integer exactly " { $snippet "numbits" } " in length, with the topmost bit set to one." } ;
{ $description "Returns an integer exactly " { $snippet "numbits" } " bits in length, with the topmost bit set to one." } ;
HELP: with-random
{ $values { "obj" "a random number generator" } { "quot" quotation } }