Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
(de sma (@Len)
|
||||
(curry (@Len (Data)) (N)
|
||||
(push 'Data N)
|
||||
(and (nth Data @Len) (con @)) # Truncate
|
||||
(*/ (apply + Data) (length Data)) ) )
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
(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) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue