github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/slice/flat/api.go (about)

     1  // Package flat provides short aliases for slice functions
     2  package flat
     3  
     4  import "github.com/m4gshm/gollections/slice"
     5  
     6  // AndConvert - flattener.AndConvert alias
     7  func AndConvert[FS ~[]From, From any, IS ~[]I, I, To any](elements FS, flattener func(From) IS, convert func(I) To) []To {
     8  	return slice.FlatAndConvert(elements, flattener, convert)
     9  }