macros: clean up the usage example of MACRO: syntax
parent
fba461fe64
commit
90511c90af
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue