diff --git a/core/collections/sequence-combinators.facts b/core/collections/sequence-combinators.facts index 82f7ffdc7d..7a484260c3 100644 --- a/core/collections/sequence-combinators.facts +++ b/core/collections/sequence-combinators.facts @@ -163,7 +163,7 @@ HELP: monotonic? { $description "Applies the relation to successive pairs of elements in the sequence, testing for a truth value. The relation should be a transitive relation, such as a total order or an equality relation." } { $examples "Testing if a sequence is non-decreasing:" - { $example "{ 1 1 2 } [ >= ] monotonic? ." "t" } + { $example "{ 1 1 2 } [ <= ] monotonic? ." "t" } "Testing if a sequence is decreasing:" { $example "{ 9 8 6 7 } [ < ] monotonic? ." "f" } } diff --git a/core/compiler/alien/syntax.facts b/core/compiler/alien/syntax.facts index d731a420da..98c2db6bdb 100644 --- a/core/compiler/alien/syntax.facts +++ b/core/compiler/alien/syntax.facts @@ -34,7 +34,11 @@ $terpri } "You can define a word for invoking it:" { $example - "LIBRARY: foo\nFUNCTION: void the_answer ( char* question, int value ) ;\n\\ the_answer compile\n\"the question\" 42 the-answer" "The answer to the question is 42." + "LIBRARY: foo\nFUNCTION: void the_answer ( char* question, int value ) ;" + "USE: compiler" + "\\ the_answer compile" + "\"the question\" 42 the_answer" + "The answer to the question is 42." } } { $notes "Note that the parentheses and commas are only syntax sugar and can be omitted; they serve no purpose other than to make the declaration slightly easier to read:" { $code diff --git a/core/effects.facts b/core/effects.facts index b230785cf4..8616fd3cea 100644 --- a/core/effects.facts +++ b/core/effects.facts @@ -16,7 +16,7 @@ HELP: effect>string { $values { "effect" "a stack effect" } { "string" "a string" } } { $description "Turns a stack effect object into a string mnemonic." } { $examples - { $example "1 2 effect>string print" "( object object -- object )" } + { $example "1 2 effect>string print" "( object -- object object )" } } ; HELP: stack-effect diff --git a/core/syntax/parser.facts b/core/syntax/parser.facts index 59cffecda4..931b2ea983 100644 --- a/core/syntax/parser.facts +++ b/core/syntax/parser.facts @@ -53,7 +53,7 @@ HELP: bad-escape HELP: escape { $values { "escape" "a single-character escape" } { "ch" "a character" } } { $description "Converts from a single-character escape code and the corresponding character." } -{ $examples { $example "CHAR: n escape CHAR: \n = ." "t" } } ; +{ $examples { $example "CHAR: n escape CHAR: \\n = ." "t" } } ; HELP: parse-string { $values { "str" "a new string" } } diff --git a/core/ui/commands.facts b/core/ui/commands.facts index 5a69339a4e..b215577f4c 100644 --- a/core/ui/commands.facts +++ b/core/ui/commands.facts @@ -19,7 +19,7 @@ HELP: gesture>string { $values { "gesture" "a gesture" } { "string/f" "a " { $link string } " or " { $link f } } } { $contract "Creates a human-readable string from a gesture object, returning " { $link f } " if the gesture does not have a human-readable form." } { $examples - { $example "T{ key-down f { C+ } \"x\" } gesture>string print" "C+x" } + { $example "USE: gadgets" "T{ key-down f { C+ } \"x\" } gesture>string print" "C+x" } } ; HELP: commands