moved with-in-vocab back to rpc

db4
Sam Anklesaria 2009-05-18 17:21:57 -05:00
parent f528ca6ac1
commit db3840bc40
2 changed files with 22 additions and 22 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007, 2009 Daniel Ehrenberg, Bruno Deferrari,
! Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs fry hashtables kernel namespaces sequences
USING: assocs hashtables kernel namespaces sequences
sets strings vocabs sorting accessors arrays ;
IN: vocabs.parser
@ -57,6 +57,3 @@ SYMBOL: in
: set-in ( name -- )
check-vocab-string dup in set create-vocab (use+) ;
: with-in ( vocab quot -- vocab ) over
[ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline

View File

@ -5,6 +5,9 @@ IN: modules.rpc
DEFER: get-words
: with-in-vocab ( vocab quot -- vocab ) over
[ '[ _ set-in @ ] in get swap dip set-in ] dip vocab ; inline
: remote-quot ( addrspec vocabspec effect str -- quot )
'[ _ 5000 <inet> binary
[
@ -20,4 +23,4 @@ DEFER: get-words
dup "-remote" append [
[ (( -- words )) [ "get-words" remote-quot ] keep call-effect ] 2keep
[ rot first2 swap define-remote ] 2curry each
] with-in ;
] with-in-vocab ;