From 705e7018c824e8160ecd8f0e81117dbebf6e90a0 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 11 Sep 2017 15:47:39 -0700 Subject: [PATCH] random: minor doc improvement with $snippet. --- basis/random/random-docs.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/random/random-docs.factor b/basis/random/random-docs.factor index d716fe1eff..fab1253a2e 100644 --- a/basis/random/random-docs.factor +++ b/basis/random/random-docs.factor @@ -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 } }