From 76882d2c2564f84ee34b7b5ad82f7e8e7af2a012 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 21 Jul 2012 19:43:16 -0700 Subject: [PATCH] kernel: adding docs for "same?" --- core/kernel/kernel-docs.factor | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index 9198fc5cd0..1a536bae85 100644 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -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." }