fix get
, solving turtle movement hang
This commit is contained in:
parent
b31452db78
commit
43693e3c0e
|
@ -776,7 +776,7 @@ fn diff {
|
||||||
fn get {
|
fn get {
|
||||||
"Takes a key, dict, and optional default value; returns the value at key. If the value is not found, returns nil or the default value."
|
"Takes a key, dict, and optional default value; returns the value at key. If the value is not found, returns nil or the default value."
|
||||||
(key as :keyword) -> get (key, _)
|
(key as :keyword) -> get (key, _)
|
||||||
(key as :keyword, dict as :dict) -> get (key, dict)
|
(key as :keyword, dict as :dict) -> get (key, dict, nil)
|
||||||
(key as :keyword, dict as :dict, default) -> base :get (key, dict, default)
|
(key as :keyword, dict as :dict, default) -> base :get (key, dict, default)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,7 +1319,7 @@ fn pencolor {
|
||||||
|
|
||||||
fn penwidth {
|
fn penwidth {
|
||||||
"Returns the turtle's pen width in pixels."
|
"Returns the turtle's pen width in pixels."
|
||||||
() -> turtle_state () :pencolor
|
() -> turtle_state () :penwidth
|
||||||
}
|
}
|
||||||
|
|
||||||
box state = nil
|
box state = nil
|
||||||
|
|
|
@ -52,13 +52,14 @@
|
||||||
(comment
|
(comment
|
||||||
# (do
|
# (do
|
||||||
(def source `
|
(def source `
|
||||||
words ("hello, world!")
|
forward! (100)
|
||||||
`)
|
`)
|
||||||
(def out (-> source
|
(def out (-> source
|
||||||
ludus
|
ludus
|
||||||
j/decode
|
j/decode
|
||||||
))
|
))
|
||||||
(setdyn :out stdout)
|
(setdyn :out stdout)
|
||||||
|
(pp out)
|
||||||
(def console (out "console"))
|
(def console (out "console"))
|
||||||
(print console)
|
(print console)
|
||||||
(def result (out "result"))
|
(def result (out "result"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user