# Crystal will return NaN if an empty array is passed def mean(arr) : Float64 arr.sum / arr.size.to_f end