github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/slice/sum/api.go (about) 1 // Package sum provides sum.Of alias 2 package sum 3 4 import ( 5 "github.com/m4gshm/gollections/c" 6 "github.com/m4gshm/gollections/slice" 7 ) 8 9 // Of an alias of the slice.Sum 10 func Of[TS ~[]T, T c.Summable](elements TS) T { 11 return slice.Sum(elements) 12 }