fix get, solving turtle movement hang

This commit is contained in:
Scott Richmond 2024-06-18 11:13:33 -04:00
parent b31452db78
commit 43693e3c0e
2 changed files with 4 additions and 3 deletions

View File

@ -776,7 +776,7 @@ fn diff {
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."
(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)
}
@ -1319,7 +1319,7 @@ fn pencolor {
fn penwidth {
"Returns the turtle's pen width in pixels."
() -> turtle_state () :pencolor
() -> turtle_state () :penwidth
}
box state = nil

View File

@ -52,13 +52,14 @@
(comment
# (do
(def source `
words ("hello, world!")
forward! (100)
`)
(def out (-> source
ludus
j/decode
))
(setdyn :out stdout)
(pp out)
(def console (out "console"))
(print console)
(def result (out "result"))