]> gitweb.factorcode.org Git - factor.git/blobdiff - core/continuations/continuations.factor
continuations[-docs]: add the finally word
[factor.git] / core / continuations / continuations.factor
index 63a704a07f2649927a2ecc93a58d2e00a810ff08..bf32960d0f979fcd147f6b035619f73ce8da5257 100644 (file)
@@ -162,6 +162,9 @@ callback-error-hook [ [ die rethrow ] ] initialize
 : cleanup ( try cleanup-always cleanup-error -- )
     [ compose [ dip rethrow ] curry recover ] [ drop ] 2bi call ; inline
 
+: finally ( try cleanup-always -- )
+    [ ] cleanup ; inline
+
 ERROR: attempt-all-error ;
 
 : attempt-all ( ... seq quot: ( ... elt -- ... obj ) -- ... obj )