// MaxInt64 returns the maximum value of an int64 slice, or 0 if the slice is empty.
MaxInt64 returns the maximum value of an int64 slice, or 0 if the slice is empty.
// MaxInt64 returns the maximum value of an int64 slice or 0 if the slice is empty .
func MaxInt64(vals []int64) int64 {
	if len(vals) == 0 {
		return 0
	} else if len(vals) == 1 {
		return vals[0]
	}
	max := vals[0]
	for _, v := range vals[1:] {
		if v > max {
			max = v
		}
	}
	return max
}
func MaxInt64 ( vals [ ] int64 ) int64 { if len ( vals ) == 0 { return 0 } else if len ( vals ) == 1 { return vals [ 0 ] } max := vals [ 0 ] for _ , v := range vals [ 1 : ] { if v > max { max = v } } return max }
MaxInt64 returns the maximum value of an int64 slice, or 0 if the slice is empty.
MaxInt64 returns the maximum value of an int64 slice or 0 if the slice is empty .