diff --git a/greg/misc.go b/greg/misc.go index 2dd28ca..7d562ef 100644 --- a/greg/misc.go +++ b/greg/misc.go @@ -99,7 +99,7 @@ func Reduce[T any](slc []T, fn func(T, T) T) T { // Generate numbers in a range - start to end (both inclusive) func genRangeInclusive[T character](start, end T) []T { - toRet := make([]T, end-start) + toRet := make([]T, (end-start)+1) for i := start; i <= end; i++ { toRet[i-start] = i }