macros: clean up the usage example of MACRO: syntax

db4
Keita Haga 2011-02-05 00:00:14 +09:00
parent fba461fe64
commit 90511c90af
1 changed files with 2 additions and 2 deletions

View File

@ -16,9 +16,9 @@ HELP: MACRO:
{ $examples
"A macro that calls a quotation but preserves any values it consumes off the stack:"
{ $code
"USING: fry generalizations ;"
"USING: fry generalizations kernel macros stack-checker ;"
"MACRO: preserving ( quot -- )"
" [ infer in>> length ] keep '[ _ ndup @ ] ;"
" [ inputs ] keep '[ _ ndup @ ] ;"
}
"Using this macro, we can define a variant of " { $link if } " which takes a predicate quotation instead of a boolean; any values consumed by the predicate quotation are restored immediately after:"
{ $code