more doc types.

db4
John Benediktsson 2014-05-26 07:51:19 -07:00
parent 02ac0662e7
commit cea47b896d
5 changed files with 20 additions and 21 deletions

View File

@ -215,45 +215,45 @@ HELP: vtruncate
{ $description "Truncates each element of " { $snippet "u" } "." } ; { $description "Truncates each element of " { $snippet "u" } "." } ;
HELP: n+v HELP: n+v
{ $values { "n" "a number" } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } } { $values { "n" number } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } }
{ $description "Adds " { $snippet "n" } " to each element of " { $snippet "v" } "." } ; { $description "Adds " { $snippet "n" } " to each element of " { $snippet "v" } "." } ;
HELP: v+n HELP: v+n
{ $values { "u" "a sequence of numbers" } { "n" "a number" } { "w" "a sequence of numbers" } } { $values { "u" "a sequence of numbers" } { "n" number } { "w" "a sequence of numbers" } }
{ $description "Adds " { $snippet "n" } " to each element of " { $snippet "u" } "." } ; { $description "Adds " { $snippet "n" } " to each element of " { $snippet "u" } "." } ;
HELP: n-v HELP: n-v
{ $values { "n" "a number" } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } } { $values { "n" number } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } }
{ $description "Subtracts each element of " { $snippet "v" } " from " { $snippet "n" } "." } ; { $description "Subtracts each element of " { $snippet "v" } " from " { $snippet "n" } "." } ;
HELP: v-n HELP: v-n
{ $values { "u" "a sequence of numbers" } { "n" "a number" } { "w" "a sequence of numbers" } } { $values { "u" "a sequence of numbers" } { "n" number } { "w" "a sequence of numbers" } }
{ $description "Subtracts " { $snippet "n" } " from each element of " { $snippet "u" } "." } ; { $description "Subtracts " { $snippet "n" } " from each element of " { $snippet "u" } "." } ;
HELP: n*v HELP: n*v
{ $values { "n" "a number" } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } } { $values { "n" number } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } }
{ $description "Multiplies each element of " { $snippet "v" } " by " { $snippet "n" } "." } ; { $description "Multiplies each element of " { $snippet "v" } " by " { $snippet "n" } "." } ;
HELP: v*n HELP: v*n
{ $values { "u" "a sequence of numbers" } { "n" "a number" } { "w" "a sequence of numbers" } } { $values { "u" "a sequence of numbers" } { "n" number } { "w" "a sequence of numbers" } }
{ $description "Multiplies each element of " { $snippet "u" } " by " { $snippet "n" } "." } ; { $description "Multiplies each element of " { $snippet "u" } " by " { $snippet "n" } "." } ;
HELP: n/v HELP: n/v
{ $values { "n" "a number" } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } } { $values { "n" number } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } }
{ $description "Divides " { $snippet "n" } " by each element of " { $snippet "v" } "." } { $description "Divides " { $snippet "n" } " by each element of " { $snippet "v" } "." }
{ $errors "May throw an error if a division by zero occurs; see " { $link "division-by-zero" } "." } ; { $errors "May throw an error if a division by zero occurs; see " { $link "division-by-zero" } "." } ;
HELP: v/n HELP: v/n
{ $values { "u" "a sequence of numbers" } { "n" "a number" } { "w" "a sequence of numbers" } } { $values { "u" "a sequence of numbers" } { "n" number } { "w" "a sequence of numbers" } }
{ $description "Divides each element of " { $snippet "u" } " by " { $snippet "n" } "." } { $description "Divides each element of " { $snippet "u" } " by " { $snippet "n" } "." }
{ $errors "May throw an error if a division by zero occurs; see " { $link "division-by-zero" } "." } ; { $errors "May throw an error if a division by zero occurs; see " { $link "division-by-zero" } "." } ;
HELP: n^v HELP: n^v
{ $values { "n" "a number" } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } } { $values { "n" number } { "v" "a sequence of numbers" } { "w" "a sequence of numbers" } }
{ $description "Raises " { $snippet "n" } " to the power of each element of " { $snippet "v" } "." } ; { $description "Raises " { $snippet "n" } " to the power of each element of " { $snippet "v" } "." } ;
HELP: v^n HELP: v^n
{ $values { "u" "a sequence of numbers" } { "n" "a number" } { "w" "a sequence of numbers" } } { $values { "u" "a sequence of numbers" } { "n" number } { "w" "a sequence of numbers" } }
{ $description "Raises each element of " { $snippet "u" } " to the power of " { $snippet "n" } "." } ; { $description "Raises each element of " { $snippet "u" } " to the power of " { $snippet "n" } "." } ;
HELP: v+ HELP: v+

View File

@ -1,6 +1,5 @@
USING: help.markup help.syntax kernel kernel.private USING: assocs help.markup help.syntax kernel math
sequences words namespaces.private quotations vectors namespaces.private quotations words words.symbol ;
math.parser math words.symbol assocs ;
IN: namespaces IN: namespaces
ARTICLE: "namespaces-combinators" "Namespace combinators" ARTICLE: "namespaces-combinators" "Namespace combinators"
@ -107,7 +106,7 @@ HELP: with-global
{ $description "Runs the quotation in the global namespace." } ; { $description "Runs the quotation in the global namespace." } ;
HELP: +@ HELP: +@
{ $values { "n" "a number" } { "variable" "a variable, by convention a symbol" } } { $values { "n" number } { "variable" "a variable, by convention a symbol" } }
{ $description "Adds " { $snippet "n" } " to the value of the variable. A variable value of " { $link f } " is interpreted as being zero." } { $description "Adds " { $snippet "n" } " to the value of the variable. A variable value of " { $link f } " is interpreted as being zero." }
{ $side-effects "variable" } { $side-effects "variable" }
{ $examples { $examples

View File

@ -149,13 +149,13 @@ HELP: no-word
{ $description "Throws a " { $link no-word-error } "." } ; { $description "Throws a " { $link no-word-error } "." } ;
HELP: parse-word HELP: parse-word
{ $values { "string" string } { "word" "a number" } } { $values { "string" string } { "word" word } }
{ $description "If " { $snippet "string" } " is a valid number literal, it is converted to a number, otherwise the current vocabulary search path is searched for a word named by the string." } { $description "If " { $snippet "string" } " is a valid number literal, it is converted to a number, otherwise the current vocabulary search path is searched for a word named by the string." }
{ $errors "Throws an error if the token does not name a word, and does not parse as a number." } { $errors "Throws an error if the token does not name a word, and does not parse as a number." }
{ $notes "This word is used to implement " { $link scan-word } "." } ; { $notes "This word is used to implement " { $link scan-word } "." } ;
HELP: parse-datum HELP: parse-datum
{ $values { "string" string } { "word/number" "a word or number" } } { $values { "string" string } { "word/number" { $or word number } } }
{ $description "If " { $snippet "string" } " is a valid number literal, it is converted to a number, otherwise the current vocabulary search path is searched for a word named by the string." } { $description "If " { $snippet "string" } " is a valid number literal, it is converted to a number, otherwise the current vocabulary search path is searched for a word named by the string." }
{ $errors "Throws an error if the token does not name a word, and does not parse as a number." } { $errors "Throws an error if the token does not name a word, and does not parse as a number." }
{ $notes "This word is used to implement " { $link ?scan-datum } " and " { $link scan-datum } "." } ; { $notes "This word is used to implement " { $link ?scan-datum } " and " { $link scan-datum } "." } ;

View File

@ -1020,20 +1020,20 @@ HELP: unclip-last-slice
{ $description "Outputs a head sequence and the last element of " { $snippet "seq" } "; the head sequence consists of all elements of " { $snippet "seq" } " but the last Unlike " { $link unclip-last } ", this word does not make a copy of the input sequence, and runs in constant time." } ; { $description "Outputs a head sequence and the last element of " { $snippet "seq" } "; the head sequence consists of all elements of " { $snippet "seq" } " but the last Unlike " { $link unclip-last } ", this word does not make a copy of the input sequence, and runs in constant time." } ;
HELP: sum HELP: sum
{ $values { "seq" "a sequence of numbers" } { "n" "a number" } } { $values { "seq" "a sequence of numbers" } { "n" number } }
{ $description "Outputs the sum of all elements of " { $snippet "seq" } ". Outputs zero given an empty sequence." } ; { $description "Outputs the sum of all elements of " { $snippet "seq" } ". Outputs zero given an empty sequence." } ;
HELP: product HELP: product
{ $values { "seq" "a sequence of numbers" } { "n" "a number" } } { $values { "seq" "a sequence of numbers" } { "n" number } }
{ $description "Outputs the product of all elements of " { $snippet "seq" } ". Outputs one given an empty sequence." } ; { $description "Outputs the product of all elements of " { $snippet "seq" } ". Outputs one given an empty sequence." } ;
HELP: infimum HELP: infimum
{ $values { "seq" "a sequence of real numbers" } { "n" "a number" } } { $values { "seq" "a sequence of real numbers" } { "n" number } }
{ $description "Outputs the least element of " { $snippet "seq" } "." } { $description "Outputs the least element of " { $snippet "seq" } "." }
{ $errors "Throws an error if the sequence is empty." } ; { $errors "Throws an error if the sequence is empty." } ;
HELP: supremum HELP: supremum
{ $values { "seq" "a sequence of real numbers" } { "n" "a number" } } { $values { "seq" "a sequence of real numbers" } { "n" number } }
{ $description "Outputs the greatest element of " { $snippet "seq" } "." } { $description "Outputs the greatest element of " { $snippet "seq" } "." }
{ $errors "Throws an error if the sequence is empty." } ; { $errors "Throws an error if the sequence is empty." } ;

View File

@ -120,7 +120,7 @@ HELP: set-generate
HELP: get-info HELP: get-info
{ $values { $values
{ "result" "an assoc" } { "result" assoc }
} }
{ $description { $description
"Returns an assoc containing server information." "Returns an assoc containing server information."