Documentation ¶
Index ¶
- func ToMap[K comparable, V any](i Iterable[K, V]) map[K]V
- func ToSlice[V any](i Iterable[int, V]) []V
- type Generator
- type Iterable
- func FromMap[K comparable, V any](inner map[K]V) Iterable[K, V]
- func FromMapWithKeyList[K comparable, V any](inner map[K]V, keys []K) Iterable[K, V]
- func FromSlice[V any](inner []V) Iterable[int, V]
- func Map[K, NK comparable, V, NV any](i Iterable[K, V], fn func(K, V) (NK, NV)) Iterable[NK, NV]
- func NewGenerator[K comparable, V any](key K, value V, inner func(K, V) (K, V)) Iterable[K, V]
- type Slice
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMap ¶
func ToMap[K comparable, V any](i Iterable[K, V]) map[K]V
Types ¶
type Generator ¶
type Generator[K comparable, V any] struct { // contains filtered or unexported fields }
type Iterable ¶
type Iterable[K comparable, V any] interface { Next() (K, V, bool) HasNext() bool Reset() }
func FromMap ¶
func FromMap[K comparable, V any](inner map[K]V) Iterable[K, V]
func FromMapWithKeyList ¶
func FromMapWithKeyList[K comparable, V any](inner map[K]V, keys []K) Iterable[K, V]
func Map ¶
func Map[K, NK comparable, V, NV any](i Iterable[K, V], fn func(K, V) (NK, NV)) Iterable[NK, NV]
func NewGenerator ¶
func NewGenerator[K comparable, V any](key K, value V, inner func(K, V) (K, V)) Iterable[K, V]
type Table ¶
type Table[K comparable, V any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.