Documentation fixes
parent
749522c29c
commit
5160bab4fd
|
@ -1,62 +1,46 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: help.markup help.syntax io.streams.string quotations
|
USING: help.markup help.syntax io.streams.string quotations
|
||||||
math ;
|
math kernel ;
|
||||||
IN: combinators.short-circuit
|
IN: combinators.short-circuit
|
||||||
|
|
||||||
HELP: 0&&
|
HELP: 0&&
|
||||||
{ $values
|
{ $values { "quots" "a sequence of quotations with stack effect " { $snippet "( -- )" } } { "?" "the result of the last quotation, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
{ $description "If every quotation in the sequence outputs a true value, outputs the result of the last quotation, otherwise outputs " { $link f } "." } ;
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if every quotation in the sequence of quotations returns true." } ;
|
|
||||||
|
|
||||||
HELP: 0||
|
HELP: 0||
|
||||||
{ $values
|
{ $values { "quots" "a sequence of quotations with stack effect " { $snippet "( -- )" } } { "?" "the first true result, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
{ $description "If every quotation in the sequence outputs " { $link f } ", outputs " { $link f } ", otherwise outputs the result of the first quotation that did not yield " { $link f } "." } ;
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if any quotation in the sequence returns true." } ;
|
|
||||||
|
|
||||||
HELP: 1&&
|
HELP: 1&&
|
||||||
{ $values
|
{ $values { "obj" object } { "quots" "a sequence of quotations with stack effect " { $snippet "( -- )" } } { "?" "the result of the last quotation, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
{ $description "If every quotation in the sequence outputs a true value, outputs the result of the last quotation, otherwise outputs " { $link f } "." } ;
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if every quotation in the sequence of quotations returns true. Each quotation gets the same element from the datastack and must output a boolean." } ;
|
|
||||||
|
|
||||||
HELP: 1||
|
HELP: 1||
|
||||||
{ $values
|
{ $values { "obj" object } { "quots" "a sequence of quotations" } { "?" "the first true result, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same element from the datastack and must return a boolean." } ;
|
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same element from the datastack and must return a boolean." } ;
|
||||||
|
|
||||||
HELP: 2&&
|
HELP: 2&&
|
||||||
{ $values
|
{ $values { "obj1" object } { "obj2" object } { "quots" "a sequence of quotations with stack effect " { $snippet "( -- )" } } { "?" "the result of the last quotation, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
{ $description "If every quotation in the sequence outputs a true value, outputs the result of the last quotation, otherwise outputs " { $link f } "." } ;
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if every quotation in the sequence of quotations returns true. Each quotation gets the same two elements from the datastack and must output a boolean." } ;
|
|
||||||
|
|
||||||
HELP: 2||
|
HELP: 2||
|
||||||
{ $values
|
{ $values { "obj1" object } { "obj2" object } { "quots" "a sequence of quotations" } { "?" "the first true result, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same two elements from the datastack and must return a boolean." } ;
|
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same two elements from the datastack and must return a boolean." } ;
|
||||||
|
|
||||||
HELP: 3&&
|
HELP: 3&&
|
||||||
{ $values
|
{ $values { "obj1" object } { "obj2" object } { "obj3" object } { "quots" "a sequence of quotations with stack effect " { $snippet "( -- )" } } { "?" "the result of the last quotation, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
{ $description "If every quotation in the sequence outputs a true value, outputs the result of the last quotation, otherwise outputs " { $link f } "." } ;
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if every quotation in the sequence of quotations returns true. Each quotation gets the same three elements from the datastack and must output a boolean." } ;
|
|
||||||
|
|
||||||
HELP: 3||
|
HELP: 3||
|
||||||
{ $values
|
{ $values { "obj1" object } { "obj2" object } { "obj3" object } { "quots" "a sequence of quotations" } { "?" "the first true result, or " { $link f } } }
|
||||||
{ "quots" "a sequence of quotations" }
|
|
||||||
{ "quot" quotation } }
|
|
||||||
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same three elements from the datastack and must return a boolean." } ;
|
{ $description "Returns true if any quotation in the sequence returns true. Each quotation takes the same three elements from the datastack and must return a boolean." } ;
|
||||||
|
|
||||||
HELP: n&&
|
HELP: n&&
|
||||||
{ $values
|
{ $values
|
||||||
{ "quots" "a sequence of quotations" } { "N" integer }
|
{ "quots" "a sequence of quotations" } { "n" integer }
|
||||||
{ "quot" quotation } }
|
{ "quot" quotation } }
|
||||||
{ $description "A macro that rewrites the code to pass " { $snippet "n" } " parameters from the stack to each AND quotation." } ;
|
{ $description "A macro that rewrites the code to pass " { $snippet "n" } " parameters from the stack to each quotation, evaluating the result in the same manner as " { $link 0&& } "." } ;
|
||||||
|
|
||||||
HELP: n||
|
HELP: n||
|
||||||
{ $values
|
{ $values
|
||||||
|
|
|
@ -324,7 +324,7 @@ HELP: each-integer
|
||||||
|
|
||||||
HELP: all-integers?
|
HELP: all-integers?
|
||||||
{ $values { "n" integer } { "quot" { $quotation "( i -- ? )" } } { "?" "a boolean" } }
|
{ $values { "n" integer } { "quot" { $quotation "( i -- ? )" } } { "?" "a boolean" } }
|
||||||
{ $description "Applies the quotation to each integer from 0 up to " { $snippet "n" } ", excluding " { $snippet "n" } ". Iterationi stops when the quotation outputs " { $link f } " or the end is reached. If the quotation yields a false value for some integer, this word outputs " { $link f } ". Otherwise, this word outputs " { $link t } "." }
|
{ $description "Applies the quotation to each integer from 0 up to " { $snippet "n" } ", excluding " { $snippet "n" } ". Iteration stops when the quotation outputs " { $link f } " or the end is reached. If the quotation yields a false value for some integer, this word outputs " { $link f } ". Otherwise, this word outputs " { $link t } "." }
|
||||||
{ $notes "This word is used to implement " { $link all? } "." } ;
|
{ $notes "This word is used to implement " { $link all? } "." } ;
|
||||||
|
|
||||||
HELP: find-integer
|
HELP: find-integer
|
||||||
|
|
Loading…
Reference in New Issue