stack-checker: add a sample output in the last example of inference-recursive-combinators article

db4
Keita Haga 2011-01-23 21:56:19 +09:00
parent 2a6e6517a0
commit c04fbe892d
1 changed files with 2 additions and 1 deletions

View File

@ -91,9 +91,10 @@ $nl
"However a small change can be made:"
{ $example ": good ( ? quot: ( ? -- ) -- ) [ good ] 2keep [ not ] dip call ; inline recursive" "[ [ drop ] good ] infer." "( x -- )" }
"An inline recursive word must have a fixed stack effect in its base case. The following will not infer:"
{ $code
{ $example
": foo ( quot ? -- ) [ f foo ] [ call ] if ; inline"
"[ [ 5 ] t foo ] infer."
"The inline recursive word “foo” must be declared recursive\nword foo"
} ;
ARTICLE: "tools.inference" "Stack effect tools"