From: Björn Lindqvist Date: Mon, 18 Nov 2013 16:13:51 +0000 (+0100) Subject: Docs: example for head? and subwords X-Git-Tag: 0.97~687 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=6b061ffabffde86d10764bd3b1776fff94213879 Docs: example for head? and subwords --- 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 } "." }