]> gitweb.factorcode.org Git - factor.git/commitdiff
continuations: make with-return use with-variable instead of with-scope.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 15 Jun 2015 16:11:35 +0000 (09:11 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 15 Jun 2015 16:11:35 +0000 (09:11 -0700)
core/continuations/continuations.factor

index b6d07a0f6c9be7749c1c63829caec81a3e7ff3a5..292a0b5bc810eca547bc6b5d21a12d712fdfa3ec 100644 (file)
@@ -100,7 +100,7 @@ PRIVATE>
 SYMBOL: return-continuation
 
 : with-return ( quot -- )
-    [ [ return-continuation set ] prepose callcc0 ] with-scope ; inline
+    [ return-continuation ] dip [ with-variable ] 2curry callcc0 ; inline
 
 : return ( -- * )
     return-continuation get continue ;