Return 0.0 from mean of empty collection
This commit is contained in:
parent
685bc86fc0
commit
f83ad0f8ef
@ -11,7 +11,7 @@
|
||||
count (count coll)]
|
||||
(if (pos? count)
|
||||
(/ sum (float count))
|
||||
0)))
|
||||
0.0)))
|
||||
|
||||
(defn median [coll]
|
||||
(let [sorted (sort coll)
|
||||
|
Loading…
x
Reference in New Issue
Block a user