stack-checker: add a sample output in the last example of inference-recursive-combinators article
parent
2a6e6517a0
commit
c04fbe892d
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue