kernel: adding docs for "same?"

db4
John Benediktsson 2012-07-21 19:43:16 -07:00
parent 493176a3b5
commit 76882d2c25
1 changed files with 8 additions and 0 deletions

View File

@ -184,6 +184,14 @@ HELP: either?
{ $example "USING: kernel math prettyprint ;" "5 7 [ even? ] either? ." "f" }
} ;
HELP: same?
{ $values { "x" object } { "y" object } { "quot" { $quotation "( ... obj -- ... obj' )" } } { "?" "a boolean" } }
{ $description "Applies the quotation to both " { $snippet "x" } " and " { $snippet "y" } ", and then checks if the results are equal." }
{ $examples
{ $example "USING: kernel math prettyprint ;" "4 5 [ 2/ ] same? ." "t" }
{ $example "USING: kernel math prettyprint ;" "3 7 [ sq ] same? ." "f" }
} ;
HELP: execute
{ $values { "word" word } }
{ $description "Executes a word. Words which " { $link execute } " an input parameter must be declared " { $link POSTPONE: inline } " so that a caller which passes in a literal word can have a static stack effect." }