From ac23acc2c98e7a897a5d12f3bebe283174c36a6c Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 30 Jan 2015 13:34:37 -0800 Subject: [PATCH] Fix some minor errors in help-lint. --- basis/math/statistics/statistics-docs.factor | 6 +++--- extra/sequences/extras/extras-docs.factor | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/basis/math/statistics/statistics-docs.factor b/basis/math/statistics/statistics-docs.factor index b408acf581c..83d89a9fc79 100644 --- a/basis/math/statistics/statistics-docs.factor +++ b/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 @@ -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"} } diff --git a/extra/sequences/extras/extras-docs.factor b/extra/sequences/extras/extras-docs.factor index 4e347eec45a..26dff24245f 100644 --- a/extra/sequences/extras/extras-docs.factor +++ b/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* @@ -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