Create system.myc

This commit is contained in:
Michael Schimmel
2026-03-08 13:10:00 +01:00
parent b622f7f8bd
commit 6f2d9b0e47
+19
View File
@@ -0,0 +1,19 @@
;; Myc System Library
;; Standard macros and core utilities.
(do
(macro while [cond body]
`((fn [] (if ~cond
(do ~body (again))
)))
)
;; Creates a stateful cache (Series) from a stateless stream.
(macro cache [lookback type src]
`(do
(def data (series ~lookback ~type))
(pipe [~src] (fn [s] (do (push data s))))
data
)
)
)