]> gitweb.factorcode.org Git - factor.git/commitdiff
namespaces: Rename ``bind`` to ``with-variables``. Update a few places that called...
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 19 Jul 2012 07:02:47 +0000 (00:02 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 19 Jul 2012 07:02:47 +0000 (00:02 -0700)
37 files changed:
basis/compiler/cfg/intrinsics/simd/simd-tests.factor
basis/compiler/tests/codegen.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/propagation/branches/branches.factor
basis/io/monitors/recursive/recursive-tests.factor
basis/io/sockets/unix/unix.factor
basis/locals/parser/parser.factor
basis/match/match-tests.factor
basis/match/match.factor
basis/mirrors/mirrors-tests.factor
basis/peg/ebnf/ebnf.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/deploy-tests.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/deploy/shaker/strip-cocoa.factor
basis/tools/deploy/unix/unix.factor
basis/tools/deploy/windows/windows.factor
basis/ui/tools/deploy/deploy.factor
basis/xml-rpc/xml-rpc.factor
basis/xml/syntax/inverse/inverse.factor
basis/xml/xml.factor
core/namespaces/namespaces-docs.factor
core/namespaces/namespaces-tests.factor
core/namespaces/namespaces.factor
core/vocabs/loader/test/a/a.factor
core/vocabs/loader/test/b/b.factor
core/vocabs/loader/test/g/g.factor
extra/coroutines/coroutines.factor
extra/fastcgi/fastcgi.factor
extra/fjsc/resources/bootstrap.factor
extra/game/models/collada/collada.factor
extra/game/models/obj/obj.factor
extra/monads/monads-tests.factor
extra/opencl/opencl.factor
extra/slides/slides.factor
extra/tc-lisp-talk/tc-lisp-talk.factor

index b7e4a5c71488e8c8a8735011764ba1b387876dfd..2520c6e4ff052d6dc34a0496c5da8307ad088ad1 100644 (file)
@@ -68,21 +68,21 @@ IN: compiler.cfg.intrinsics.simd.tests
 : test-emit ( cpu rep quot -- node )
     [
         [ new \ cpu ] 2dip '[
-            test-compiler-env [ _ test-node @ ] bind
+            test-compiler-env [ _ test-node @ ] with-variables
         ] with-variable
     ] make-classes ; inline
 
 : test-emit-literal ( cpu lit rep quot -- node )
     [
         [ new \ cpu ] 3dip '[
-            test-compiler-env [ _ _ test-node-literal @ ] bind
+            test-compiler-env [ _ _ test-node-literal @ ] with-variables
         ] with-variable
     ] make-classes ; inline
 
 : test-emit-nonliteral-rep ( cpu quot -- node )
     [
         [ new \ cpu ] dip '[
-            test-compiler-env [ test-node-nonliteral-rep @ ] bind
+            test-compiler-env [ test-node-nonliteral-rep @ ] with-variables
         ] with-variable
     ] make-classes ; inline
 
index 3fe62936368185f023fb24f2fb08d916971c4c56..a7dbd01f4ac7d9f070130c18e3dc29ab0a2ed350 100644 (file)
@@ -51,7 +51,7 @@ unit-test
 
 [ 3 ]
 [
-    global [ 3 \ foo set ] bind
+    global [ 3 \ foo set ] with-variables
     \ foo [ global >n get namespaces.private:ndrop ] compile-call
 ] unit-test
 
@@ -59,20 +59,20 @@ unit-test
 
 [ 3 ]
 [
-    global [ 3 \ foo set ] bind
+    global [ 3 \ foo set ] with-variables
     \ foo [ global [ get ] swap blech call ] compile-call
 ] unit-test
 
 [ 3 ]
 [
-    global [ 3 \ foo set ] bind
+    global [ 3 \ foo set ] with-variables
     \ foo [ global [ get ] swap >n call namespaces.private:ndrop ] compile-call
 ] unit-test
 
 [ 3 ]
 [
-    global [ 3 \ foo set ] bind
-    \ foo [ global [ get ] bind ] compile-call
+    global [ 3 \ foo set ] with-variables
+    \ foo [ global [ get ] with-variables ] compile-call
 ] unit-test
 
 [ 12 13 ] [
index 9823af9abe88470acb5051d1cd1833a9f6288056..bab5789427d58335d89ac50dad4bb4fdc7f7e068 100644 (file)
@@ -187,7 +187,7 @@ SYMBOL: node-count
         } [
             nl print get keys natural-sort stack.
         ] assoc-each
-    ] bind ;
+    ] with-variables ;
 
 : optimizer-report. ( word -- )
     make-report report. ;
index ef9e4e8f0b0740e26fd432325f435dd6eb126cd5..26e2e05a9495edc29baf4d034d6e1b0a8090400f 100644 (file)
@@ -74,7 +74,7 @@ SYMBOL: infer-children-data
             _ [
                 dup +bottom+ eq?
                 [ drop null-info ] [ value-info ] if
-            ] bind
+            ] with-variables
         ] map
     ] 2map ;
 
index 7329e73a8007bfb9c14b1e4ac7f43134dae82909..947c9ce01db956cde1dfb9ed0e7a9673e54ecb51 100644 (file)
@@ -26,7 +26,7 @@ M: mock-io-backend (monitor)
     ] if ;
 
 M: mock-io-backend link-info
-    global [ link-info ] bind ;
+    global [ link-info ] with-variables ;
 
 [ ] [ 0 counter boa dummy-monitor-created set ] unit-test
 [ ] [ 0 counter boa dummy-monitor-disposed set ] unit-test
index 57207ff67a0b321eb436f1455429871dc43f0c4c..a79a741b578e304851186b2094f0f440c3079aa1 100644 (file)
@@ -7,7 +7,6 @@ io.encodings.utf8 io.files.private io.pathnames
 io.sockets.private io.streams.duplex kernel libc locals math
 math.parser sequences system threads unix unix.ffi
 vocabs ;
-EXCLUDE: namespaces => bind ;
 EXCLUDE: io => read write ;
 EXCLUDE: io.sockets => accept ;
 IN: io.sockets.unix
index 5548e95ae31cbe7d5abb89024b62cee18e93d8ea..861ffa54453b5fb196e809d6d70b6349408f246b 100644 (file)
@@ -46,10 +46,10 @@ SYMBOL: locals
     ?rewrite-closures ;
 
 : parse-multi-def ( locals -- multi-def )
-    [ ")" [ make-local ] map-tokens ] bind <multi-def> ;
+    [ ")" [ make-local ] map-tokens ] with-variables <multi-def> ;
 
 : parse-def ( name/paren locals -- def )
-    over "(" = [ nip parse-multi-def ] [ [ make-local ] bind <def> ] if ;
+    over "(" = [ nip parse-multi-def ] [ [ make-local ] with-variables <def> ] if ;
 
 M: lambda-parser parse-quotation ( -- quotation )
     H{ } clone (parse-lambda) ;
index 044b80fe9d06b736e1dccbb49eb10027f6ba9db8..e31f01f1b3c80effeee9782b3dc4148d14cab2ab 100644 (file)
@@ -50,13 +50,13 @@ C: <foo> foo
 { 1 2 } [
   1 2 <foo> T{ foo f ?a ?b } match [
     ?a ?b
-  ] bind
+  ] with-variables
 ] unit-test
 
 { 1 2 } [
   1 2 <foo> \ ?a \ ?b <foo> match [
     ?a ?b
-  ] bind
+  ] with-variables
 ] unit-test
 
 { H{ { ?a ?a } } } [ 
index ca8e8163a41141dfab823e85c9134cefdeb37059..2c5fdf5a017dcf283999150e3110f79277395887 100644 (file)
@@ -48,7 +48,7 @@ MACRO: match-cond ( assoc -- )
     [
         first2
         [ [ dupd match ] curry ] dip
-        [ bind ] curry rot
+        [ with-variables ] curry rot
         [ ?if ] 2curry append
     ] reduce ;
 
@@ -63,7 +63,7 @@ MACRO: match-cond ( assoc -- )
 
 : match-replace ( object pattern1 pattern2 -- result )
     [ match [ "Pattern does not match" throw ] unless* ] dip swap
-    [ replace-patterns ] bind ;
+    [ replace-patterns ] with-variables ;
 
 : ?1-tail ( seq -- tail/f )
     dup length zero? not [ rest ] [ drop f ] if ;
index ed1f423bb0a982da596558b01dc8720fc9ad77d2..36348c6bad3151b69011456cb13b84e76ea79ee2 100644 (file)
@@ -26,11 +26,11 @@ C: <foo> foo
     gensym [
         <mirror> [
             "foo" "name" set
-        ] bind
+        ] with-variables
     ] [ name>> ] bi
 ] unit-test
 
-[ gensym <mirror> [ "compiled" off ] bind ] must-fail
+[ gensym <mirror> [ "compiled" off ] with-variables ] must-fail
 
 TUPLE: declared-mirror-test
 { a integer initial: 0 } ;
@@ -39,10 +39,10 @@ TUPLE: declared-mirror-test
     3 declared-mirror-test boa <mirror> [
         5 "a" set
         "a" get
-    ] bind
+    ] with-variables
 ] unit-test
 
-[ 3 declared-mirror-test boa <mirror> [ t "a" set ] bind ] must-fail
+[ 3 declared-mirror-test boa <mirror> [ t "a" set ] with-variables ] must-fail
 
 TUPLE: color
 { red integer }
index ea4222f7aad309e939397fe4de7a90bd8d1af2b2..843e99d4081e2617c97a501caec4a5f45d14ba19 100644 (file)
@@ -381,7 +381,7 @@ SYMBOL: ignore-ws
     parser set \r
     swap (transform) \r
     main set \r
-  ] bind ;\r
+  ] with-variables ;\r
 \r
 M: ebnf (transform) ( ast -- parser )\r
   rules>> [ (transform) ] map last ;\r
index f8a957f65aab7decab88232c1b79f5d0398fce6c..0cc5d0b8174630c0425c81b4d8ae58999fa5e0e3 100644 (file)
@@ -112,7 +112,7 @@ DEFER: ?make-staging-image
             "-output-image=" prepend ,
             "-pic=0" ,
         ] { } make
-    ] bind ;
+    ] with-variables ;
 
 : parse-vocab-manifest-file ( path -- vocab-manifest )
     utf8 file-lines [ "empty vocab manifest!" throw ] [
index ff0cacbebdadc125899ff1d5222001a2b623f711..7775e675232708228e13440d2f0c12b31bb16d2d 100644 (file)
@@ -30,7 +30,7 @@ cache-directory [
     "hello-ui" deploy-config [
         bootstrap-profile staging-image-name file-name
         "." split second
-    ] bind
+    ] with-variables
 ] unit-test
 
 [ ] [ "maze" shake-and-bake 1200000 small-enough? ] unit-test
index 4a132ed99962326e6612fec16cb7fb4ab25053af..3f14aee59a8ecea7fd79765ddc1e965c2609c640 100644 (file)
@@ -84,11 +84,11 @@ IN: tools.deploy.macosx
             [ "Contents/Resources" copy-resources ]
             [ "Contents/Frameworks" copy-libraries ] 2bi
             bundle-name show-in-finder
-        ] bind
+        ] with-variables
     ] with-directory ;
 
 : deploy-app-bundle? ( vocab -- ? )
-    deploy-config [ deploy-console? get not deploy-ui? get or ] bind ;
+    deploy-config [ deploy-console? get not deploy-ui? get or ] with-variables ;
 
 M: macosx deploy* ( vocab -- )
     ! pass off to M: unix deploy* if we're building a console app
index eaed2cdbf15cadf5957f0a6d47a549ee40762b8a..1573a204842cf53a54aaa1bff4160e04180a3e32 100755 (executable)
@@ -640,7 +640,7 @@ SYMBOL: deploy-vocab
             "Saving final image" show
             save-image-and-exit
         ] deploy-error-handler
-    ] bind ;
+    ] with-variables ;
 
 : do-deploy ( -- )
     "output-image" get
index 288d192e3b184eceedb80f9361283d334d6f4341..283d888bbb9a8977cdf2f62a8887c880e34ead01 100644 (file)
@@ -14,7 +14,7 @@ IN: tools.deploy.shaker.cocoa
 : pool-values ( assoc -- assoc' ) [ pool-array ] assoc-map ;
 
 H{ } clone \ pool [
-    global [
+    [
         ! Only keeps those methods that we actually call
         sent-messages get super-sent-messages get assoc-union
         objc-methods [ assoc-intersect pool-values ] change
@@ -34,7 +34,7 @@ H{ } clone \ pool [
         ! We need this for strip-stack-traces to work fully
         { message-senders super-message-senders }
         [ get values compile ] each
-    ] bind
+    ] with-global
 ] with-variable
 
 \ make-prepare-send reset-memoized
index 562546f1c224dec2d83a5e07399888aeea9f42fb..0b4b58ee666541a6a4e9fe552eae96ba8b96ab2f 100644 (file)
@@ -22,5 +22,5 @@ M: unix deploy* ( vocab -- )
             bundle-name "" [ copy-resources ] [ copy-libraries ] 3bi
             bundle-name normalize-path "Binary deployed to " "." surround print
             bundle-name webbrowser:open-file
-        ] bind
+        ] with-variables
     ] with-directory ;
index 08255f9cf5f92eb080e7bbaf3f26671fddbcb963..8de593c1fb1f3183a77068be2dcca03f235d0db9 100755 (executable)
@@ -40,5 +40,5 @@ M: windows deploy*
                 [ nip "" [ copy-resources ] [ copy-libraries ] 3bi ]
                 [ nip open-in-explorer ]
             } 2cleave 
-        ] bind
+        ] with-variables
     ] with-directory ;
index 2c54d0bc2352e92a963138dd84f7aa6413917525..34c579c35a14d054b380839549f808805ba5d906 100644 (file)
@@ -49,7 +49,7 @@ TUPLE: deploy-gadget < pack vocab settings ;
 
         deploy-settings-theme
         namespace <mapping> >>model
-    ] bind ;
+    ] with-variables ;
 
 : find-deploy-gadget ( gadget -- deploy-gadget )
     [ deploy-gadget? ] find-parent ;
index 89463b77a479d950636bc9bcf7e1be528f53f4be..795e9146b3eb9d5fb180bb8abe127d065fc8102a 100644 (file)
@@ -161,7 +161,7 @@ TAG: array xml>item
 
 : parse-fault ( xml -- fault-code fault-string )
     first-child-tag first-child-tag first-child-tag
-    xml>item [ "faultCode" get "faultString" get ] bind ;
+    xml>item [ "faultCode" get "faultString" get ] with-variables ;
 
 : receive-rpc ( xml -- rpc )
     dup main>> dup "methodCall" =
index a4fcb8c70173fc2f8785267d1eb3d72638630737..cdcc364741796bedc8cbe2bd06c83f4cf7c3c30a 100644 (file)
@@ -69,6 +69,6 @@ M: interpolated [undo-xml]
     sort-keys values <enum> ;
 
 : undo-xml ( xml -- quot )
-    [undo-xml] '[ H{ } clone [ _ bind ] keep >enum ] ;
+    [undo-xml] '[ H{ } clone [ _ with-variables ] keep >enum ] ;
 
 \ interpolate-xml 1 [ undo-xml ] define-pop-inverse
index 22e1a850b70d03227c61093fce093933bca2d312..58a5af16b0506e3e937b629dc8c1edd30a28c0c5 100644 (file)
@@ -120,7 +120,7 @@ TUPLE: pull-xml scope ;
         text-now? get [ parse-text f ] [
             get-char [ make-tag t ] [ f f ] if
         ] if text-now? set
-    ] bind ;
+    ] with-variables ;
 
 <PRIVATE
 
index cebd5ba59ced0e09d47fcc49bc473254f505297d..343a2f1741c53a03635309999794de01672eb2e0 100644 (file)
@@ -8,7 +8,7 @@ ARTICLE: "namespaces-combinators" "Namespace combinators"
     make-assoc
     with-scope
     with-variable
-    bind
+    with-variables
 } ;
 
 ARTICLE: "namespaces-change" "Changing variable values"
@@ -150,7 +150,7 @@ HELP: make-assoc
 { $values { "quot" quotation } { "exemplar" assoc } { "hash" "a new assoc" } }
 { $description "Calls the quotation in a new namespace of the same type as " { $snippet "exemplar" } ", and outputs this namespace when the quotation returns. Useful for quickly building assocs." } ;
 
-HELP: bind
+HELP: with-variables
 { $values { "ns" assoc } { "quot" quotation } }
 { $description "Calls the quotation in the dynamic scope of " { $snippet "ns" } ". When variables are looked up by the quotation, " { $snippet "ns" } " is checked first, and setting variables in the quotation stores them in " { $snippet "ns" } "." } ;
 
index 12ca3f6a2021b66e98a693908b28bebc955e3930..27cd6a9d090ce30326eb42917a553e92dd5f7823 100644 (file)
@@ -5,13 +5,13 @@ IN: namespaces.tests
 H{ } clone "test-namespace" set
 
 : test-namespace ( -- ? )
-    H{ } clone dup [ namespace = ] bind ;
+    H{ } clone dup [ namespace = ] with-variables ;
 
 [ t ] [ test-namespace ] unit-test
 
 10 "some-global" set
 [ f ]
-[ H{ } clone [ f "some-global" set "some-global" get ] bind ]
+[ H{ } clone [ f "some-global" set "some-global" get ] with-variables ]
 unit-test
 
 SYMBOL: test-initialize
index 9029bb9a6a1678c99500f20eadf9a757bc69f2cb..60ccbc08d9d0ce4dabdb0a2fd574ae22cc5b332f 100644 (file)
@@ -55,10 +55,11 @@ PRIVATE>
 : +@ ( n variable -- ) [ 0 or + ] change ; inline
 : inc ( variable -- ) 1 swap +@ ; inline
 : dec ( variable -- ) -1 swap +@ ; inline
-: bind ( ns quot -- ) swap >n call ndrop ; inline
+: with-variables ( ns quot -- ) swap >n call ndrop ; inline
 : counter ( variable -- n ) [ 0 or 1 + dup ] change-global ;
-: make-assoc ( quot exemplar -- hash ) 20 swap new-assoc [ swap bind ] keep ; inline
-: with-scope ( quot -- ) 5 <hashtable> swap bind ; inline
-: with-variable ( value key quot -- ) [ associate ] dip bind ; inline
-: with-global ( quot -- ) global swap bind ; inline
+: make-assoc ( quot exemplar -- hash ) 20 swap new-assoc [ swap with-variables ] keep ; inline
+: with-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
+: with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline
+: with-new-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
+: with-global ( quot -- ) [ global ] dip with-variables ; inline
 : initialize ( variable quot -- ) [ unless* ] curry change-global ; inline
index b1fa5aaed853f13278b8d315d8594a82d0b6c565..35079ba44477bf6a47ec2e8e52f129f24793b18d 100644 (file)
@@ -1,7 +1,7 @@
 USING: namespaces parser ;
 IN: vocabs.loader.test.a
 
-<< global [ "count-me" inc ] bind >>
+<< global [ "count-me" inc ] with-variables >>
 
 : v-l-t-a-hello ( -- a ) 4 ;
 
index 8bd75bfc8434f79ff1ae8913c6090e55eea76f79..8a1830029575793ea1c10e998534129600a5732e 100644 (file)
@@ -1,6 +1,6 @@
 USING: namespaces ;
 IN: vocabs.loader.test.b
 
-<< global [ "count-me" inc ] bind >>
+<< global [ "count-me" inc ] with-variables >>
 
 : fred bob ;
\ No newline at end of file
index 8f124b193584758b425f66aaae78e467ea5f2bf4..3cb99a5a05d96940da77e7d8256e88b9ec6de419 100644 (file)
@@ -1,4 +1,4 @@
 IN: vocabs.loader.test.g
 USING: vocabs.loader.test.f namespaces ;
 
-global [ "vocabs.loader.test.g" inc ] bind
+[ "vocabs.loader.test.g" inc ] with-global
index 6b334822c093083e79a1c7b014958a78d1130c1d..135e6c9b46ffd93ae14421346a164523a001f2e6 100644 (file)
@@ -11,7 +11,7 @@ TUPLE: coroutine resumecc exitcc originalcc ;
 : cocreate ( quot -- co )
   coroutine new
   dup current-coro associate
-  [ swapd , , \ bind , 
+  [ swapd , , \ with-variables , 
     "Coroutine has terminated illegally." , \ throw ,
   ] [ ] make
   [ >>resumecc ] [ >>originalcc ] bi ;
index 786cc10771be71fc8ef51e69773e5ccdb52541c9..50cf02f131dccdd5d945220d05f9954a79a1f9e7 100644 (file)
@@ -63,7 +63,7 @@ ENUM: fcgi-protocol-status
     FCGI_UNKNOWN_ROLE ;
 
 :: debug-print ( print-quot -- )
-    global [ print-quot call flush ] bind ; inline
+    [ print-quot call flush ] with-global ; inline
 
 ! read either a 1 byte or 4 byte big endian integer
 : read-var-int ( -- n/f )
index db63f15f1c15f3b4692701ea8de26276fd7af654..4063426d5e2d524f6725655045bd105313f09344 100644 (file)
@@ -1,6 +1,6 @@
 IN: namespaces
 USE: kernel-internals
-: bind ( ns quot -- )
+: with-variables ( ns quot -- )
   swap >n call n> drop ;
 
 "browser-dom" set-in
@@ -14,7 +14,7 @@ USE: kernel-internals
   { } "" "html" { "string" } alien-invoke ;
 
 : bind-event ( name element quot -- )
-  >function swap { } "" "bind" { "string" "function" } alien-invoke ;
+  >function swap { } "" "with-variables" { "string" "function" } alien-invoke ;
 
 "scratchpad" set-in
 
index 407718e91c9d2ac8c06818d70254e2d0615d76ec..4759dc6fe4d63b0bd3b678df05ff937dc2554173 100644 (file)
@@ -159,7 +159,7 @@ VERTEX-FORMAT: collada-vertex-format
     [
         { { up-axis y-up } { unit-ratio 1 } } [
             mesh>sources
-        ] bind
+        ] with-variables
     ]
     [ mesh>vertices ]
     [ mesh>triangles ] tri ;
index 1f1877ef4f3a47c49e4c78721ef6ca7c1ac21b5f..9b661c9fd2d505fb4ab11e4b27ff0ecea03d7fc5 100644 (file)
@@ -82,7 +82,7 @@ TUPLE: material
     [
         ascii file-lines [ line>mtl ] each
         md
-    ] bind ;
+    ] with-variables ;
 
 VERTEX-FORMAT: obj-vertex-format
     { "POSITION" float-components 3 f }
@@ -162,5 +162,5 @@ M: obj-models stream>models
     [
         [ line>obj ] each-stream-line push-current-model
         models get
-    ] bind ;
+    ] with-variables ;
 
index 5504633bb636fdac67bc5007f3c930467c142776..34535a11b5f46fa156ff1814babfae62818682ca 100644 (file)
@@ -10,7 +10,7 @@ IN: monads.tests
 ] unit-test
 
 [ nothing ] [
-    111 just [ maybe-monad fail ] bind
+    111 just [ maybe-monad fail ] with-variables
 ] unit-test
 
 [ 100 ] [
@@ -26,7 +26,7 @@ IN: monads.tests
 ] unit-test
 
 [ { } ] [
-    { 1 2 3 } [ drop "OOPS" array-monad fail ] bind
+    { 1 2 3 } [ drop "OOPS" array-monad fail ] with-variables
 ] unit-test
 
 [ 5 ] [
@@ -34,7 +34,7 @@ IN: monads.tests
 ] unit-test
 
 [ 8 ] [
-    5 state-monad return [ 3 + state-monad return ] bind
+    5 state-monad return [ 3 + state-monad return ] with-variables
     "initial state" run-st
 ] unit-test
 
@@ -52,9 +52,9 @@ IN: monads.tests
 
 [ 15 ] [
     f state-monad return
-    [ drop get-st ] bind
-    [ 4 + put-st ] bind
-    [ drop get-st ] bind
+    [ drop get-st ] with-variables
+    [ 4 + put-st ] with-variables
+    [ drop get-st ] with-variables
     11 run-st
 ] unit-test
 
@@ -104,12 +104,12 @@ LAZY: nats-from ( n -- list )
 ] unit-test
 
 [ 6 ] [
-    f reader-monad return [ drop ask ] bind [ 1 + ] local 5 run-reader
+    f reader-monad return [ drop ask ] with-variables [ 1 + ] local 5 run-reader
 ] unit-test
 
 [ f { 1 2 3 } ] [
     5 writer-monad return
-    [ drop { 1 2 3 } tell ] bind
+    [ drop { 1 2 3 } tell ] with-variables
     run-writer
 ] unit-test
 
index 455022235227ec682392b8a32a1b7e092613c10f..fab4b55322b0dda71af3f0b600007b74ccd9aac8 100644 (file)
@@ -423,7 +423,7 @@ PRIVATE>
             [ cl-current-device  set ] when*
             [ cl-current-context set ] when*
         ] 3curry H{ } make-assoc
-    ] dip bind ; inline
+    ] dip with-variable ; inline
 
 : cl-platforms ( -- platforms )
     0 f 0 uint <ref> [ clGetPlatformIDs cl-success ] keep uint deref
index fe552a77a1d6e9d9cc095d64b0e55e70c84e146b..2b1aef6d2b96083ea57fcb8fc51685449cb0c239 100644 (file)
@@ -68,7 +68,7 @@ CONSTANT: stylesheet
     [
         stylesheet clone [
             [ print-element ] with-default-style
-        ] bind
+        ] with-variables
     ] make-pane
     dup page-theme ;
 
index aebeaafa22badc962dc063a02d358262501ea60f..abad987fb8cd2d08aadb70ee6839674f9ad592f4 100644 (file)
@@ -115,7 +115,7 @@ M: circle perimeter radius>> pi * 2 * ;"""
         { "Useful words are " { $link get-global } ", " { $link set-global } }
         "Factor idiom for changing a particular namespace"
         { $code """SYMBOL: king
-global [ "Henry VIII" king set ] bind"""
+global [ "Henry VIII" king set ] with-variables"""
         }
         { $code "with-scope" }
         { $code "namestack" }