README
This commit is contained in:
parent
ddfce6ab12
commit
e389413f6e
1 changed files with 4 additions and 5 deletions
|
|
@ -725,14 +725,13 @@ with `lein repl`:
|
||||||
(let [s (java.net.Socket. "localhost" port)
|
(let [s (java.net.Socket. "localhost" port)
|
||||||
out (.getOutputStream s)
|
out (.getOutputStream s)
|
||||||
in (java.io.PushbackInputStream. (.getInputStream s))
|
in (java.io.PushbackInputStream. (.getInputStream s))
|
||||||
_ (b/write-bencode out {"op" "eval" "code" (pr-str expr)})
|
_ (b/write-bencode out {"op" "eval" "code" expr})
|
||||||
value (get (b/read-bencode in) "value")]
|
bytes (get (b/read-bencode in) "value")]
|
||||||
(read-string value)))
|
(String. bytes)))
|
||||||
|
|
||||||
(nrepl-eval 65274 '(+ 1 2 3)) ;;=> 6
|
(nrepl-eval 52054 "(+ 1 2 3)") ;;=> "6"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Differences with Clojure
|
## Differences with Clojure
|
||||||
|
|
||||||
Babashka is implemented using the [Small Clojure
|
Babashka is implemented using the [Small Clojure
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue