d4ca9c4620
Move the SMA implementation from examples/err.myc and examples/sma.myc to a new dedicated file in lib/. This change also cleans up unused code and improves the SMA logic.
13 lines
173 B
Plaintext
13 lines
173 B
Plaintext
;; Output: 5.5
|
|
|
|
(do
|
|
(def sma20 (SMA 20))
|
|
|
|
(def n 1000)
|
|
(while (> n 0)
|
|
(do
|
|
(print "val=" n " sma20=" (sma20 n))
|
|
(assign n (- n 1))
|
|
))
|
|
)
|