From 9894a6ade5021fd48d3ffa49ae70939760f8b274 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 14 Oct 2011 14:44:15 -0700 Subject: [PATCH] continuations: document full effect of cleanup We can't yet apply the effect because of #138 but we can at least document it. --- core/continuations/continuations-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/continuations/continuations-docs.factor b/core/continuations/continuations-docs.factor index 8bcc7c754e..c6ba9b66a2 100644 --- a/core/continuations/continuations-docs.factor +++ b/core/continuations/continuations-docs.factor @@ -170,7 +170,7 @@ HELP: throw { cleanup recover } related-words HELP: cleanup -{ $values { "try" quotation } { "cleanup-always" quotation } { "cleanup-error" quotation } } +{ $values { "try" { $quotation "( ..a -- ..a )" } } { "cleanup-always" { $quotation "( ..a -- ..b )" } } { "cleanup-error" { $quotation "( ..b -- ..b )" } } } { $description "Calls the " { $snippet "try" } " quotation. If no error is thrown, calls " { $snippet "cleanup-always" } " without restoring the data stack. If an error is thrown, restores the data stack, calls " { $snippet "cleanup-always" } " followed by " { $snippet "cleanup-error" } ", and rethrows the error." } ; HELP: recover -- 2.34.1