A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
10
Task/Metaprogramming/Common-Lisp/metaprogramming-1.lisp
Normal file
10
Task/Metaprogramming/Common-Lisp/metaprogramming-1.lisp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(loop for count from 1
|
||||
for x in '(1 2 3 4 5)
|
||||
summing x into sum
|
||||
summing (* x x) into sum-of-squares
|
||||
finally
|
||||
(return
|
||||
(let* ((mean (/ sum count))
|
||||
(spl-var (- (* count sum-of-squares) (* sum sum)))
|
||||
(spl-dev (sqrt (/ spl-var (1- count)))))
|
||||
(values mean spl-var spl-dev))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue