ranges/ranges.go
func (r *InclusiveRange) Len() int {
	if r.isLenCached {
		return r.cachedLen
	}

	// Offset by one to include the end value
	diff := math.Abs(float64(r.end-r.start)) + 1
	r.cachedLen = int(math.Ceil(diff / math.Abs(float64(r.step))))
	r.isLenCached = true
	return r.cachedLen
}
func (r *InclusiveRange) Len() int {
	if r.isLenCached {
		return r.cachedLen
	}

	// Offset by one to include the end value
	diff := math.Abs(float64(r.end-r.start)) + 1
	r.cachedLen = int(math.Ceil(diff / math.Abs(float64(r.step))))
	r.isLenCached = true
	return r.cachedLen
}
// Len returns the number of values in the range