A peer-to-peer stack for code collaboration
Remove :send macro in :enter-remote-chain
Thomas Scholtes32b381656ed7
diff --git a/docs/source/guide/Chains.lrad b/docs/source/guide/Chains.lradindex fc3e25c..6cc60fb 100644--- a/docs/source/guide/Chains.lrad+++ b/docs/source/guide/Chains.lrad@@ -47,7 +47,7 @@ subsequently will have access to the atom `foo` defined as the keyword`:bar`.Using another REPL we can use the `:enter-chain` macro to inspect the-updated remote chain.+remote chain.```(:enter-chain "http://localhost:8000/chains/my-first-chain")@@ -58,18 +58,3 @@ foo ;; ==> :barEvery expression put into the REPL after the `:enter-chain` macro willbe evaluated in the context of the chain. The special `:quit` macrowill leave the chain context and revert to the original REPL context.--Next we will use `:enter-chain` to evaluate and send expressions to the-remote chain.--```-(:enter-chain "http://localhost:8000/chains/my-first-chain")-(def bar foo)-(def quux 4)-:send ;; ==> :ok-:quit-```--The `:send` macro will call `send!` for every expression input on the-REPL. This means that the state of “my-first-chain” will no define both-`bar` and `quux`.diff --git a/rad/prelude/chain.rad b/rad/prelude/chain.radindex 6349622..187a170 100644--- a/rad/prelude/chain.rad+++ b/rad/prelude/chain.rad@@ -126,19 +126,6 @@(def env_ (over (@var '_inputs) (fn [x] (add-right expr x)) env))(evalfn expr env_ ))))-;; add-send!-(def add-send!- "Add a `:send` special form that sends the contents of `_input` to the chain `_cur-chain`"- (fn [oeval]- (fn [expr env]- (if (eq? expr :send)- (do (def inpl (@var '_inputs))- (def chainl (@var '_cur-chain))- (send! (view chainl env) map (view inpl env))- (def env_ (set inpl [] env))- (list :ok env_))- ((store-exprs oeval) expr env)))))-;; enter-remote-chain!(def enter-remote-chain!"Make the eval behave as that of a remote chain. The second param is the env to return to after :quit."@@ -153,7 +140,7 @@mod-state1))(def mod-state3(over (@var 'eval)- (fn [x] (add-send! (add-quit env x)))+ (fn [x] (add-quit env x))mod-state2))(list :ok mod-state3)))