RosettaCodeData/Task/Averages-Simple-moving-average/PicoLisp/averages-simple-moving-average-2.l
2013-04-10 14:58:50 -07:00

11 lines
230 B
Text

(def 'sma3 (sma 3))
(def 'sma5 (sma 5))
(scl 2)
(for N (1.0 2.0 3.0 4.0 5.0 5.0 4.0 3.0 2.0 1.0)
(prinl
(format N *Scl)
" (sma3) "
(format (sma3 N) *Scl)
" (sma5) "
(format (sma5 N) *Scl) ) )