github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/loop/flat/api.go (about) 1 // Package flat provides short aliases for loop functions 2 package flat 3 4 import "github.com/m4gshm/gollections/loop" 5 6 // AndConvert - flattener.AndConvert flattens and converts elements retrieved by the 'next' function 7 func AndConvert[From, I, To any](next func() (From, bool), flattener func(From) []I, convert func(I) To) loop.Loop[To] { 8 return loop.Convert(loop.Flat(next, flattener), convert) 9 }