repl stuff

This commit is contained in:
Scott Richmond 2024-12-30 20:08:30 -05:00
parent b08fac2daf
commit 386108794f

View File

@ -80,27 +80,31 @@
#### REPL #### REPL
(comment (comment
# (do # (do
# (def start (os/clock)) (def start (os/clock))
(def source ` (def source `
fd! (100)
rt! (0.25) fn fib {
fd! (100) (1) -> 1
lt! (0.25) (2) -> 1
fd! (100) (n) -> add (
setheading! (0.75) fib (sub (n, 1))
unbox (turtle_state) fib (sub (n, 2))
)
}
fib (30)
`) `)
(def out (-> source (def out (-> source
ludus ludus
j/decode j/decode
)) ))
# (def end (os/clock)) (def end (os/clock))
(setdyn :out stdout) (setdyn :out stdout)
(pp out) (pp out)
(def console (out "console")) (def console (out "console"))
(print console) (print console)
(def result (out "result")) (def result (out "result"))
(print result) (print result)
# (print (- end start)) (print (- end start))
) )