From 6b061ffabffde86d10764bd3b1776fff94213879 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 18 Nov 2013 17:13:51 +0100 Subject: [PATCH] Docs: example for head? and subwords --- core/sequences/sequences-docs.factor | 8 +++++++- core/words/words-docs.factor | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/core/sequences/sequences-docs.factor b/core/sequences/sequences-docs.factor index ad0d557637..60db385cac 100644 --- a/core/sequences/sequences-docs.factor +++ b/core/sequences/sequences-docs.factor @@ -945,7 +945,13 @@ HELP: shorter? HELP: head? { $values { "seq" sequence } { "begin" sequence } { "?" "a boolean" } } -{ $description "Tests if " { $snippet "seq" } " starts with " { $snippet "begin" } ". If " { $snippet "begin" } " is longer than " { $snippet "seq" } ", this word outputs " { $link f } "." } ; +{ $description "Tests if " { $snippet "seq" } " starts with " { $snippet "begin" } ". If " { $snippet "begin" } " is longer than " { $snippet "seq" } ", this word outputs " { $link f } "." } +{ $examples + { $example + "root-cache get keys [ \"help.l\" head? ] filter ." + "{ \"help.lint.checks\" \"help.lint.private\" \"help.lint\" }" + } +} ; HELP: tail? { $values { "seq" sequence } { "end" sequence } { "?" "a boolean" } } diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 72320d23b6..4d08312cc7 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -346,6 +346,18 @@ HELP: deprecated? { $description "Tests if an object is " { $link POSTPONE: deprecated } "." } { $notes "Outputs " { $link f } " if the object is not a word." } ; +HELP: subwords +{ $values { "word" word } } +{ $description "Lists all specializations for the given word." } +{ $examples + { $example + "USING: math.functions ;" + "clear \ sin subwords ." + "{ M\ object sin M\ complex sin M\ real sin M\ float sin }" + } +} +{ $notes "Outputs " { $link f } " if the word isn't generic." } ; + HELP: make-deprecated { $values { "word" word } } { $description "Declares a word as " { $link POSTPONE: deprecated } "." } -- 2.34.1