github.com/m4gshm/gollections@v0.0.10/loop/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/loop" 7 ) 8 9 // Of an alias of the loop.Sum 10 func Of[T c.Summable, IT c.Iterator[T]](sum func() (T, bool)) T { 11 return loop.Sum(sum) 12 }