From 34e9412e290f4a8ea15ce0501f6b84ccb3284dc6 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Tue, 17 Oct 2017 23:58:35 +0300 Subject: [PATCH] syntax-docs: improve descriptions for GENERIC: and GENERIC#: --- core/syntax/syntax-docs.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 30e1860794..3fa9481623 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -671,16 +671,16 @@ HELP: NAN: HELP: GENERIC: { $syntax "GENERIC: word ( stack -- effect )" } { $values { "word" "a new word to define" } } -{ $description "Defines a new generic word in the current vocabulary. Initially, it contains no methods, and thus will throw a " { $link no-method } " error when called." } ; +{ $description "Defines a new generic word in the current vocabulary. The word dispatches on the topmost stack element. Initially it contains no methods, and thus will throw a " { $link no-method } " error when called." } ; HELP: GENERIC#: { $syntax "GENERIC#: word n ( stack -- effect )" } { $values { "word" "a new word to define" } { "n" "the stack position to dispatch on" } } -{ $description "Defines a new generic word which dispatches on the " { $snippet "n" } "th most element from the top of the stack in the current vocabulary. Initially, it contains no methods, and thus will throw a " { $link no-method } " error when called." } +{ $description "Defines a new generic word in the current vocabulary. The word dispatches on the " { $snippet "n" } "th element from the top of the stack. Initially it contains no methods, and thus will throw a " { $link no-method } " error when called." } { $notes "The following two definitions are equivalent:" - { $code "GENERIC: foo ( obj -- )" } - { $code "GENERIC#: foo 0 ( obj -- )" } + { $code "GENERIC: foo ( x y z obj -- )" } + { $code "GENERIC#: foo 0 ( x y z obj -- )" } } ; HELP: MATH: