]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/advice/advice-docs.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / advice / advice-docs.factor
1 IN: advice
2 USING: help.markup help.syntax tools.annotations words coroutines ;
3
4 HELP: make-advised
5 { $values { "word" "a word to annotate in preparation of advising" } }
6 { $description "Prepares a word for being advised.  This is done by: "
7     { $list
8         { "Annotating it to call the appropriate words before, around, and after the original body " }
9         { "Adding " { $snippet "before" } ", " { $snippet "around" } ", and " { $snippet "after" } " properties, which will contain the advice" }
10         { "Adding an " { $snippet "advised" } "property, which can later be used to determine if a given word is defined (see " { $link advised? } ")" }
11     }
12 }
13 { $see-also advised? annotate } ;
14
15 HELP: advised?
16 { $values { "word" "a word" } { "?" "t or f, indicating if " { $snippet "word" } " is advised" } }
17 { $description "Determines whether or not the given word has any advice on it." } ;
18
19 HELP: ad-do-it
20 { $values { "input" "an object" } { "result" "an object" } }
21 { $description "Calls either the next applicable around advice or the main body, returning back to the point it was called from when finished.  This word should only be called from inside advice." }
22 { $see-also coyield } ;
23
24 ARTICLE: "advice" "Advice"
25 "Advice is a simple way of adding additition functionality to words by adding 'hooks' to a word, which can act before, after, or around the calling of the word." ;
26
27 ABOUT: "advice"