From c04fbe892d9fae33db4c0d118c91fb340881cf76 Mon Sep 17 00:00:00 2001 From: Keita Haga Date: Sun, 23 Jan 2011 21:56:19 +0900 Subject: [PATCH] stack-checker: add a sample output in the last example of inference-recursive-combinators article --- basis/stack-checker/stack-checker-docs.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/stack-checker/stack-checker-docs.factor b/basis/stack-checker/stack-checker-docs.factor index 4fa66f7f38..6b3bdd354f 100644 --- a/basis/stack-checker/stack-checker-docs.factor +++ b/basis/stack-checker/stack-checker-docs.factor @@ -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"