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

     1  // Package group provides short aliases for functions that are used to group key/values retieved from a source
     2  package group
     3  
     4  import (
     5  	"github.com/m4gshm/gollections/map_"
     6  )
     7  
     8  // OfLoop - group.OfLoop synonym for the map_.GroupOfLoop.
     9  func OfLoop[S any, K comparable, V any](source S, hasNext func(S) bool, getNext func(S) (K, V, error)) (map[K][]V, error) {
    10  	return map_.GroupOfLoop(source, hasNext, getNext)
    11  }