From 42f4dc36b2c70163e124ffc2471b2166bbda2546 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 19 Jul 2012 00:02:47 -0700 Subject: [PATCH] namespaces: Rename ``bind`` to ``with-variables``. Update a few places that called ``global [ ] with-variables`` to use ``with-global``. --- .../cfg/intrinsics/simd/simd-tests.factor | 6 +++--- basis/compiler/tests/codegen.factor | 10 +++++----- basis/compiler/tree/debugger/debugger.factor | 2 +- .../tree/propagation/branches/branches.factor | 2 +- .../io/monitors/recursive/recursive-tests.factor | 2 +- basis/io/sockets/unix/unix.factor | 1 - basis/locals/parser/parser.factor | 4 ++-- basis/match/match-tests.factor | 4 ++-- basis/match/match.factor | 4 ++-- basis/mirrors/mirrors-tests.factor | 8 ++++---- basis/peg/ebnf/ebnf.factor | 2 +- basis/tools/deploy/backend/backend.factor | 2 +- basis/tools/deploy/deploy-tests.factor | 2 +- basis/tools/deploy/macosx/macosx.factor | 4 ++-- basis/tools/deploy/shaker/shaker.factor | 2 +- basis/tools/deploy/shaker/strip-cocoa.factor | 4 ++-- basis/tools/deploy/unix/unix.factor | 2 +- basis/tools/deploy/windows/windows.factor | 2 +- basis/ui/tools/deploy/deploy.factor | 2 +- basis/xml-rpc/xml-rpc.factor | 2 +- basis/xml/syntax/inverse/inverse.factor | 2 +- basis/xml/xml.factor | 2 +- core/namespaces/namespaces-docs.factor | 4 ++-- core/namespaces/namespaces-tests.factor | 4 ++-- core/namespaces/namespaces.factor | 11 ++++++----- core/vocabs/loader/test/a/a.factor | 2 +- core/vocabs/loader/test/b/b.factor | 2 +- core/vocabs/loader/test/g/g.factor | 2 +- extra/coroutines/coroutines.factor | 2 +- extra/fastcgi/fastcgi.factor | 2 +- extra/fjsc/resources/bootstrap.factor | 4 ++-- extra/game/models/collada/collada.factor | 2 +- extra/game/models/obj/obj.factor | 4 ++-- extra/monads/monads-tests.factor | 16 ++++++++-------- extra/opencl/opencl.factor | 2 +- extra/slides/slides.factor | 2 +- extra/tc-lisp-talk/tc-lisp-talk.factor | 2 +- 37 files changed, 66 insertions(+), 66 deletions(-) diff --git a/basis/compiler/cfg/intrinsics/simd/simd-tests.factor b/basis/compiler/cfg/intrinsics/simd/simd-tests.factor index b7e4a5c714..2520c6e4ff 100644 --- a/basis/compiler/cfg/intrinsics/simd/simd-tests.factor +++ b/basis/compiler/cfg/intrinsics/simd/simd-tests.factor @@ -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 diff --git a/basis/compiler/tests/codegen.factor b/basis/compiler/tests/codegen.factor index 3fe6293636..a7dbd01f4a 100644 --- a/basis/compiler/tests/codegen.factor +++ b/basis/compiler/tests/codegen.factor @@ -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 ] [ diff --git a/basis/compiler/tree/debugger/debugger.factor b/basis/compiler/tree/debugger/debugger.factor index 9823af9abe..bab5789427 100644 --- a/basis/compiler/tree/debugger/debugger.factor +++ b/basis/compiler/tree/debugger/debugger.factor @@ -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. ; diff --git a/basis/compiler/tree/propagation/branches/branches.factor b/basis/compiler/tree/propagation/branches/branches.factor index ef9e4e8f0b..26e2e05a94 100644 --- a/basis/compiler/tree/propagation/branches/branches.factor +++ b/basis/compiler/tree/propagation/branches/branches.factor @@ -74,7 +74,7 @@ SYMBOL: infer-children-data _ [ dup +bottom+ eq? [ drop null-info ] [ value-info ] if - ] bind + ] with-variables ] map ] 2map ; diff --git a/basis/io/monitors/recursive/recursive-tests.factor b/basis/io/monitors/recursive/recursive-tests.factor index 7329e73a80..947c9ce01d 100644 --- a/basis/io/monitors/recursive/recursive-tests.factor +++ b/basis/io/monitors/recursive/recursive-tests.factor @@ -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 diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor index 57207ff67a..a79a741b57 100644 --- a/basis/io/sockets/unix/unix.factor +++ b/basis/io/sockets/unix/unix.factor @@ -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 diff --git a/basis/locals/parser/parser.factor b/basis/locals/parser/parser.factor index 5548e95ae3..861ffa5445 100644 --- a/basis/locals/parser/parser.factor +++ b/basis/locals/parser/parser.factor @@ -46,10 +46,10 @@ SYMBOL: locals ?rewrite-closures ; : parse-multi-def ( locals -- multi-def ) - [ ")" [ make-local ] map-tokens ] bind ; + [ ")" [ make-local ] map-tokens ] with-variables ; : parse-def ( name/paren locals -- def ) - over "(" = [ nip parse-multi-def ] [ [ make-local ] bind ] if ; + over "(" = [ nip parse-multi-def ] [ [ make-local ] with-variables ] if ; M: lambda-parser parse-quotation ( -- quotation ) H{ } clone (parse-lambda) ; diff --git a/basis/match/match-tests.factor b/basis/match/match-tests.factor index 044b80fe9d..e31f01f1b3 100644 --- a/basis/match/match-tests.factor +++ b/basis/match/match-tests.factor @@ -50,13 +50,13 @@ C: foo { 1 2 } [ 1 2 T{ foo f ?a ?b } match [ ?a ?b - ] bind + ] with-variables ] unit-test { 1 2 } [ 1 2 \ ?a \ ?b match [ ?a ?b - ] bind + ] with-variables ] unit-test { H{ { ?a ?a } } } [ diff --git a/basis/match/match.factor b/basis/match/match.factor index ca8e8163a4..2c5fdf5a01 100644 --- a/basis/match/match.factor +++ b/basis/match/match.factor @@ -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 ; diff --git a/basis/mirrors/mirrors-tests.factor b/basis/mirrors/mirrors-tests.factor index ed1f423bb0..36348c6bad 100644 --- a/basis/mirrors/mirrors-tests.factor +++ b/basis/mirrors/mirrors-tests.factor @@ -26,11 +26,11 @@ C: foo gensym [ [ "foo" "name" set - ] bind + ] with-variables ] [ name>> ] bi ] unit-test -[ gensym [ "compiled" off ] bind ] must-fail +[ gensym [ "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 [ 5 "a" set "a" get - ] bind + ] with-variables ] unit-test -[ 3 declared-mirror-test boa [ t "a" set ] bind ] must-fail +[ 3 declared-mirror-test boa [ t "a" set ] with-variables ] must-fail TUPLE: color { red integer } diff --git a/basis/peg/ebnf/ebnf.factor b/basis/peg/ebnf/ebnf.factor index ea4222f7aa..843e99d408 100644 --- a/basis/peg/ebnf/ebnf.factor +++ b/basis/peg/ebnf/ebnf.factor @@ -381,7 +381,7 @@ SYMBOL: ignore-ws parser set swap (transform) main set - ] bind ; + ] with-variables ; M: ebnf (transform) ( ast -- parser ) rules>> [ (transform) ] map last ; diff --git a/basis/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor index f8a957f65a..0cc5d0b817 100644 --- a/basis/tools/deploy/backend/backend.factor +++ b/basis/tools/deploy/backend/backend.factor @@ -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 ] [ diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index ff0cacbebd..7775e67523 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -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 diff --git a/basis/tools/deploy/macosx/macosx.factor b/basis/tools/deploy/macosx/macosx.factor index 4a132ed999..3f14aee59a 100644 --- a/basis/tools/deploy/macosx/macosx.factor +++ b/basis/tools/deploy/macosx/macosx.factor @@ -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 diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index eaed2cdbf1..1573a20484 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -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 diff --git a/basis/tools/deploy/shaker/strip-cocoa.factor b/basis/tools/deploy/shaker/strip-cocoa.factor index 288d192e3b..283d888bbb 100644 --- a/basis/tools/deploy/shaker/strip-cocoa.factor +++ b/basis/tools/deploy/shaker/strip-cocoa.factor @@ -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 diff --git a/basis/tools/deploy/unix/unix.factor b/basis/tools/deploy/unix/unix.factor index 562546f1c2..0b4b58ee66 100644 --- a/basis/tools/deploy/unix/unix.factor +++ b/basis/tools/deploy/unix/unix.factor @@ -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 ; diff --git a/basis/tools/deploy/windows/windows.factor b/basis/tools/deploy/windows/windows.factor index 08255f9cf5..8de593c1fb 100755 --- a/basis/tools/deploy/windows/windows.factor +++ b/basis/tools/deploy/windows/windows.factor @@ -40,5 +40,5 @@ M: windows deploy* [ nip "" [ copy-resources ] [ copy-libraries ] 3bi ] [ nip open-in-explorer ] } 2cleave - ] bind + ] with-variables ] with-directory ; diff --git a/basis/ui/tools/deploy/deploy.factor b/basis/ui/tools/deploy/deploy.factor index 2c54d0bc23..34c579c35a 100644 --- a/basis/ui/tools/deploy/deploy.factor +++ b/basis/ui/tools/deploy/deploy.factor @@ -49,7 +49,7 @@ TUPLE: deploy-gadget < pack vocab settings ; deploy-settings-theme namespace >>model - ] bind ; + ] with-variables ; : find-deploy-gadget ( gadget -- deploy-gadget ) [ deploy-gadget? ] find-parent ; diff --git a/basis/xml-rpc/xml-rpc.factor b/basis/xml-rpc/xml-rpc.factor index 89463b77a4..795e9146b3 100644 --- a/basis/xml-rpc/xml-rpc.factor +++ b/basis/xml-rpc/xml-rpc.factor @@ -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" = diff --git a/basis/xml/syntax/inverse/inverse.factor b/basis/xml/syntax/inverse/inverse.factor index a4fcb8c701..cdcc364741 100644 --- a/basis/xml/syntax/inverse/inverse.factor +++ b/basis/xml/syntax/inverse/inverse.factor @@ -69,6 +69,6 @@ M: interpolated [undo-xml] sort-keys values ; : 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 diff --git a/basis/xml/xml.factor b/basis/xml/xml.factor index 22e1a850b7..58a5af16b0 100644 --- a/basis/xml/xml.factor +++ b/basis/xml/xml.factor @@ -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 ; : +@ ( 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 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 swap with-variables ; inline +: with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline +: with-new-scope ( quot -- ) 5 swap with-variables ; inline +: with-global ( quot -- ) [ global ] dip with-variables ; inline : initialize ( variable quot -- ) [ unless* ] curry change-global ; inline diff --git a/core/vocabs/loader/test/a/a.factor b/core/vocabs/loader/test/a/a.factor index b1fa5aaed8..35079ba444 100644 --- a/core/vocabs/loader/test/a/a.factor +++ b/core/vocabs/loader/test/a/a.factor @@ -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 ; diff --git a/core/vocabs/loader/test/b/b.factor b/core/vocabs/loader/test/b/b.factor index 8bd75bfc84..8a18300295 100644 --- a/core/vocabs/loader/test/b/b.factor +++ b/core/vocabs/loader/test/b/b.factor @@ -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 diff --git a/core/vocabs/loader/test/g/g.factor b/core/vocabs/loader/test/g/g.factor index 8f124b1935..3cb99a5a05 100644 --- a/core/vocabs/loader/test/g/g.factor +++ b/core/vocabs/loader/test/g/g.factor @@ -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 diff --git a/extra/coroutines/coroutines.factor b/extra/coroutines/coroutines.factor index 6b334822c0..135e6c9b46 100644 --- a/extra/coroutines/coroutines.factor +++ b/extra/coroutines/coroutines.factor @@ -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 ; diff --git a/extra/fastcgi/fastcgi.factor b/extra/fastcgi/fastcgi.factor index 786cc10771..50cf02f131 100644 --- a/extra/fastcgi/fastcgi.factor +++ b/extra/fastcgi/fastcgi.factor @@ -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 ) diff --git a/extra/fjsc/resources/bootstrap.factor b/extra/fjsc/resources/bootstrap.factor index db63f15f1c..4063426d5e 100644 --- a/extra/fjsc/resources/bootstrap.factor +++ b/extra/fjsc/resources/bootstrap.factor @@ -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 diff --git a/extra/game/models/collada/collada.factor b/extra/game/models/collada/collada.factor index 407718e91c..4759dc6fe4 100644 --- a/extra/game/models/collada/collada.factor +++ b/extra/game/models/collada/collada.factor @@ -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 ; diff --git a/extra/game/models/obj/obj.factor b/extra/game/models/obj/obj.factor index 1f1877ef4f..9b661c9fd2 100644 --- a/extra/game/models/obj/obj.factor +++ b/extra/game/models/obj/obj.factor @@ -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 ; diff --git a/extra/monads/monads-tests.factor b/extra/monads/monads-tests.factor index 5504633bb6..34535a11b5 100644 --- a/extra/monads/monads-tests.factor +++ b/extra/monads/monads-tests.factor @@ -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 diff --git a/extra/opencl/opencl.factor b/extra/opencl/opencl.factor index 4550222352..fab4b55322 100644 --- a/extra/opencl/opencl.factor +++ b/extra/opencl/opencl.factor @@ -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 [ clGetPlatformIDs cl-success ] keep uint deref diff --git a/extra/slides/slides.factor b/extra/slides/slides.factor index fe552a77a1..2b1aef6d2b 100644 --- a/extra/slides/slides.factor +++ b/extra/slides/slides.factor @@ -68,7 +68,7 @@ CONSTANT: stylesheet [ stylesheet clone [ [ print-element ] with-default-style - ] bind + ] with-variables ] make-pane dup page-theme ; diff --git a/extra/tc-lisp-talk/tc-lisp-talk.factor b/extra/tc-lisp-talk/tc-lisp-talk.factor index aebeaafa22..abad987fb8 100644 --- a/extra/tc-lisp-talk/tc-lisp-talk.factor +++ b/extra/tc-lisp-talk/tc-lisp-talk.factor @@ -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" } -- 2.34.1