]> gitweb.factorcode.org Git - factor.git/blobdiff - core/continuations/continuations.factor
core: using fry in a few places to see how it works.
[factor.git] / core / continuations / continuations.factor
index 577ae71aaf669451572db5439d032d70bc7cb419..12bb976a0aeeb7a41ec12322bb1ea938540ce6b0 100644 (file)
@@ -151,15 +151,13 @@ callback-error-hook [ [ die rethrow ] ] initialize
     [ drop ] recover ; inline
 
 : ignore-error ( quot check: ( error -- ? ) -- )
-    [ dup ] prepose [ [ drop ] [ rethrow ] if ] compose
-    recover ; inline
+    '[ dup @ [ drop ] [ rethrow ] if ] recover ; inline
 
 : ignore-error/f ( quot check: ( error -- ? ) -- )
-    [ dup ] prepose [ [ drop f ] [ rethrow ] if ] compose
-    recover ; inline
+    '[ dup @ [ drop f ] [ rethrow ] if ] recover ; inline
 
 : cleanup ( try cleanup-always cleanup-error -- )
-    [ compose [ dip rethrow ] curry recover ] [ drop ] 2bi call ; inline
+    [ '[ [ @ @ ] dip rethrow ] recover ] [ drop ] 2bi call ; inline
 
 : finally ( try cleanup-always -- )
     [ ] cleanup ; inline
@@ -171,7 +169,7 @@ ERROR: attempt-all-error ;
         attempt-all-error
     ] [
         [
-            [ [ , f ] compose [ , drop t ] recover ] curry all?
+            '[ [ @ , f ] [ , drop t ] recover ] all?
         ] { } make last swap [ rethrow ] when
     ] if ; inline