called keywords work in pipelines

This commit is contained in:
Scott Richmond 2024-07-14 14:28:09 -04:00
parent 9e50f0cbdf
commit 9ddb43a30f
2 changed files with 7 additions and 7 deletions

View File

@ -460,6 +460,7 @@
[:function :tuple] (call-fn root-ast prev curr)
# [:applied :tuple] (call-partial root-ast prev curr)
[:keyword :args] (get (first curr) prev :^nil)
[:keyword :tuple] (get (first curr) prev :^nil)
[:dict :keyword] (get prev curr :^nil)
[:nil :keyword] :^nil
[:pkg :keyword] (get prev curr :^nil)
@ -489,9 +490,9 @@
(def last-term (last terms))
(for i 1 (-> terms length dec)
(def curr (interpret (terms i) ctx))
(set prev (call-fn (first terms) curr [prev])))
(set prev (apply-synth-term (first terms) curr [prev])))
(def last-fn (interpret last-term ctx))
(call-fn (first terms) last-fn [prev]))
(apply-synth-term (first terms) last-fn [prev]))
(defn- pkg [ast ctx]
(def members (ast :data))

View File

@ -53,21 +53,20 @@
(comment
# (do
(def start (os/clock))
# (def start (os/clock))
(def source `
at ("aéc", 3)
`)
(def out (-> source
ludus
j/decode
))
(def end (os/clock))
# (def end (os/clock))
(setdyn :out stdout)
(pp out)
(def console (out "console"))
(print console)
(def result (out "result"))
(print result)
(print (- end start))
# (print (- end start))
)