Skip to content

Commit

Permalink
Fix some minor errors in help-lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Jan 31, 2015
1 parent 5e01164 commit ac23acc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions basis/math/statistics/statistics-docs.factor
@@ -1,5 +1,5 @@
USING: assocs debugger hashtables help.markup help.syntax
quotations sequences math ;
kernel quotations sequences math ;
IN: math.statistics

HELP: geometric-mean
Expand All @@ -16,9 +16,9 @@ HELP: harmonic-mean
{ $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ;

HELP: kth-smallest
{ $values { "seq" sequence } { "k" integer } }
{ $values { "seq" sequence } { "k" integer } { "elt" object } }
{ $description "Returns the kth smallest element. This is semantically equivalent to " { $snippet "swap natural-sort nth" } ", and is therefore zero-indexed. " { $snippet "k" } " may not be larger than the highest index of " { $snippet "sequence" } "." }
{ $examples { $example "USING: math.statistics ;" "{ 3 1 2 } 1 kth-smallest ." "2" } } ;
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 3 1 2 } 1 kth-smallest ." "2" } } ;

HELP: mean
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
Expand Down
10 changes: 6 additions & 4 deletions extra/sequences/extras/extras-docs.factor
@@ -1,4 +1,4 @@
USING: help.markup help.syntax math sequences ;
USING: help.markup help.syntax kernel math sequences ;
IN: sequences.extras

HELP: count*
Expand All @@ -7,29 +7,31 @@ HELP: count*
{ "quot" { $quotation ( ... elt -- ... ? ) } }
{ "%" rational } }
{ $description "Outputs the fraction of elements in the sequence for which the predicate quotation matches." }
{ $examples { $example "USING: math.ranges prettyprint sequences.extras ;" "100 [1,b] [ even? ] count*" "1/2" } } ;
{ $examples { $example "USING: math math.ranges prettyprint sequences.extras ;" "100 [1,b] [ even? ] count* ." "1/2" } } ;

HELP: collapse
{ $values
{ "seq" sequence }
{ "quot" { $quotation ( ... elt -- ... ? ) } }
{ "elt" object }
{ "seq'" sequence } }
{ $description "Generate a new sequence where all runs of elements for which the predicate returns true are replaced by a single instance of " { $snippet "elt" } "." }
{ $see-also compact }
{ $examples
"Collapse multiple spaces in a string down to a single space"
{ $example "USING: sequences.extras ;" "\" Hello, crazy world \" [ CHAR: \\s = ] \" \" collapse" "\" Hello, crazy world \"" } } ;
{ $example "USING: kernel prettyprint sequences.extras ;" "\" Hello, crazy world \" [ CHAR: \\s = ] \" \" collapse ." "\" Hello, crazy world \"" } } ;

HELP: compact
{ $values
{ "seq" sequence }
{ "quot" { $quotation ( ... elt -- ... ? ) } }
{ "elt" object }
{ "seq'" sequence } }
{ $description "Generate a new sequence where all runs of elements for which the predicate returns true are replaced by a single instance of " { $snippet "elt" } ". Runs at the beginning or end of the sequence for which the predicate returns true are removed." }
{ $see-also collapse }
{ $examples
"Collapse multiple spaces in a string down to a single space"
{ $example "USING: sequences.extras ;" "\" Hello, crazy world \" [ CHAR: \\s = ] \" \" compact" "\"Hello, crazy world\"" } } ;
{ $example "USING: kernel prettyprint sequences.extras ;" "\" Hello, crazy world \" [ CHAR: \\s = ] \" \" compact ." "\"Hello, crazy world\"" } } ;

HELP: combos
{ $values
Expand Down

0 comments on commit ac23acc

Please sign in to comment.