From 2cf48566f710f9c7980f8afe17ea4dae822a03c3 Mon Sep 17 00:00:00 2001 From: Brummel Date: Tue, 31 Mar 2026 10:07:31 +0200 Subject: [PATCH] Remove SMA macro The `sma.myc` file, which defined the Simple Moving Average macro, has been removed. This functionality is no longer needed. --- rtl/sma.myc | 20 -------------------- src/ast/rtl/prelude.myc | 2 ++ 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 rtl/sma.myc diff --git a/rtl/sma.myc b/rtl/sma.myc deleted file mode 100644 index f4e918e..0000000 --- a/rtl/sma.myc +++ /dev/null @@ -1,20 +0,0 @@ -(do - (def SMA - (fn [length] - (do - (def history (series length)) - (def sum 0.0) - - (fn [val] - (do - (def hist_len (len history)) - (if (>= hist_len length) - (assign sum (- sum (history (- length 1))))) - - (push history val) - (assign sum (+ sum val)) - - (if (>= hist_len length) - (/ sum length)) - ))))) -) diff --git a/src/ast/rtl/prelude.myc b/src/ast/rtl/prelude.myc index 718f63d..4178b72 100644 --- a/src/ast/rtl/prelude.myc +++ b/src/ast/rtl/prelude.myc @@ -2,6 +2,8 @@ ;; Standard macros and core utilities. (do + (def func1 (print "Hello World")) + (macro while [cond body] `((fn [] (if ~cond (do ~body (again))