]> gitweb.factorcode.org Git - factor.git/blobdiff - core/kernel/kernel.factor
kernel: Add withd
[factor.git] / core / kernel / kernel.factor
index 82e8553f5f48bef03b3047e6c364d314e0652914..ce9c8381cbb0d7ada0c863b44aa0fc00f547f900 100644 (file)
@@ -236,6 +236,9 @@ DEFER: if
 : 2with ( param1 param2 obj quot -- obj curried )
     with with ; inline
 
+: withd ( param obj quot -- obj curried )
+    swapd [ -rotd call ] 2curry ; inline
+
 : prepose ( quot1 quot2 -- composed )
     swap compose ; inline