diff --git a/library/kernel.facts b/library/kernel.facts index 58d8058aec..eeed7c0198 100644 --- a/library/kernel.facts +++ b/library/kernel.facts @@ -104,7 +104,7 @@ HELP: <=> "( obj1 obj2 -- n )" HELP: clone "( obj -- cloned )" { $values { "obj" "an object" } { "cloned" "a new object" } } -{ $contract "Outputs a new object equal to the given object. This is not guaranteed to actually copy the object; it does nothing with immutable objects, and does not copy words either. However, sequences and tuples can be cloned to obtain a shallow copy of the original." ; +{ $contract "Outputs a new object equal to the given object. This is not guaranteed to actually copy the object; it does nothing with immutable objects, and does not copy words either. However, sequences and tuples can be cloned to obtain a shallow copy of the original." } ; HELP: set-boot "( quot -- )" { $values { "quot" "a quotation" } } diff --git a/library/syntax/parse-syntax.facts b/library/syntax/parse-syntax.facts index 4fb8d6acd1..104579b9e8 100644 --- a/library/syntax/parse-syntax.facts +++ b/library/syntax/parse-syntax.facts @@ -13,19 +13,15 @@ HELP: inline "" HELP: foldable "" { $description - "Declares that the most recently defined word can be evaluated at compile-time. Foldable words are always " { $link POSTPONE: } "." - $terpri - "Foldable words are evaluated at compile time if all inputs are literal. Foldable words must satisfy a very strong contract:" + "Declares that the most recently defined word may be evaluated at compile-time if all inputs are literal. Foldable words must satisfy a very strong contract:" { $list - { "foldable words must not have any observable side effects," } - { "foldable words must halt - for example, a word computing a series until it coverges should not be foldable, since compilation will not halt in the event the series does not converge." } - { "both inputs and outputs of foldable words must be immutable." } + "foldable words must not have any observable side effects," + "foldable words must halt - for example, a word computing a series until it coverges should not be foldable, since compilation will not halt in the event the series does not converge." + "both inputs and outputs of foldable words must be immutable." } "The last restriction ensures that words such as " { $link clone } " do not satisfy the foldable word contract. Indeed, " { $link clone } " will output a mutable object if its input is mutable, and so it is undesirable to evaluate it at compile-time, since doing so would give incorrect semantics for code that clones mutable objects and proceeds to mutate them." } -{ $examples - "Most operations on numbers are foldable. For example, " { $snippet "2 2 +" } " compiles to a literal 4, since " { $link + } " is declared foldable." -} ; +{ $examples "Most operations on numbers are foldable. For example, " { $snippet "2 2 +" } " compiles to a literal 4, since " { $link + } " is declared foldable." } ; HELP: t "( -- t )" { $values { "t" "the canonical truth value" } }