Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
(define (standart-deviation-generator)
|
||||
(let ((nums '()))
|
||||
(lambda (x)
|
||||
(set! nums (cons x nums))
|
||||
(let* ((mean (/ (apply + nums) (length nums)))
|
||||
(mean-sqr (lambda (y) (expt (- y mean) 2)))
|
||||
(variance (/ (apply + (map mean-sqr nums)) (length nums))))
|
||||
(sqrt variance)))))
|
||||
|
||||
(let loop ((f (standart-deviation-generator))
|
||||
(input '(2 4 4 4 5 5 7 9)))
|
||||
(unless (null? input)
|
||||
(display (f (car input)))
|
||||
(newline)
|
||||
(loop f (cdr input))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue