func cumulativeSum(arr []float64) []float64 {
	var a []float64
	accum := 0.0
	for _, v := range arr {
		accum += v
		a = append(a, accum)
	}
	return a
}
// cumulativeSum return cumulative sum slice
cumulativeSum return cumulative sum slice
// cumulativeSum return cumulative sum slice
func cumulativeSum(arr []float64) []float64 {
	var a []float64
	accum := 0.0
	for _, v := range arr {
		accum += v
		a = append(a, accum)
	}
	return a
}
func cumulativeSum ( arr [ ] float64 ) [ ] float64 { var a [ ] float64 accum := 0.0 for _ , v := range arr { accum += v a = append ( a , accum ) } return a }
cumulativeSum return cumulative sum slice
cumulativeSum return cumulative sum slice