From e7cc0d02c698655f5fa7800083a44bc615f75493 Mon Sep 17 00:00:00 2001
From: Sam Anklesaria <sam@Tintin.local>
Date: Sun, 31 May 2009 11:56:39 -0500
Subject: [PATCH] "NS[" syntax added to closures

---
 extra/closures/closures.factor | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/extra/closures/closures.factor b/extra/closures/closures.factor
index 7fd08db998..eb5a293fed 100644
--- a/extra/closures/closures.factor
+++ b/extra/closures/closures.factor
@@ -1,7 +1,13 @@
-USING: assocs io.pathnames fry namespaces kernel sequences parser ;
+USING: assocs io.pathnames fry namespaces namespaces.private kernel sequences parser ;
 IN: closures
 SYMBOL: |
+
+! Selective Binding
 : delayed-bind-with ( vars quot -- quot' ) '[ _ dup [ get ] map zip [ _ bind ] curry ] ;
 SYNTAX: C[ | parse-until parse-quotation delayed-bind-with over push-all ;
 ! Common ones
-SYNTAX: DIR[ parse-quotation { current-directory } swap delayed-bind-with over push-all ;
\ No newline at end of file
+SYNTAX: DIR[ parse-quotation { current-directory } swap delayed-bind-with over push-all ;
+
+! Namespace Binding
+: bind-to-namespace ( quot -- quot' ) '[ namespace [ _ bind ] curry ] ;
+SYNTAX: NS[ parse-quotation bind-to-namespace over push-all ;
\ No newline at end of file