;; Myc System Library ;; Standard macros and core utilities. (do (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. (macro cache [lookback type src] `(do (def data (series ~lookback ~type)) (pipe [~src] (fn [s] (do (push data s)))) data ) ) )