;; Myc System Library ;; Standard macros and core utilities. (do (def func1 (print "Hello World")) (macro while [cond body] `((fn [] (if ~cond (do ~body (again)) ))) ) (macro repeat [var limit body] `((fn [~var __limit] (if (< ~var __limit) (do ~body (again (+ ~var 1) __limit) ) )) 0 ~limit) ) ;; Creates a stateful cache (Series) from a stateless stream. ;; The element type is inferred from the stream's item type. (macro cache [lookback src] `(do (def data (series ~lookback)) (pipe [~src] (fn [s] (do (push data s)))) data ) ) )