github.com/m4gshm/gollections@v0.0.10/loop/api_internal.go (about)

     1  package loop
     2  
     3  import (
     4  	"github.com/m4gshm/gollections/c"
     5  	"github.com/m4gshm/gollections/kv"
     6  )
     7  
     8  func startIt[T any, I c.Iterator[T]](i I) (I, T, bool) {
     9  	element, ok := i.Next()
    10  	return i, element, ok
    11  }
    12  
    13  func startKvIt[K, V any, I kv.Iterator[K, V]](i I) (I, K, V, bool) {
    14  	k, v, ok := i.Next()
    15  	return i, k, v, ok
    16  }