Documentation
¶
Overview ¶
Package bitter lets you build cool rangefuncs using iter.Seq and iter.Seq2.
Index ¶
- func Enhance[V, Kp, Vp any](in iter.Seq[V], do func(V) (Kp, Vp)) iter.Seq2[Kp, Vp]
- func ForEach[V, Vp any](in iter.Seq[V], do func(V) Vp) iter.Seq[Vp]
- func ForEach2[K, V, Kp, Vp any](in iter.Seq2[K, V], do func(K, V) (Kp, Vp)) iter.Seq2[Kp, Vp]
- func ForEachContext[V, Vp any](ctx context.Context, in iter.Seq[V], do func(context.Context, V) Vp) iter.Seq[Vp]
- func ForEachContext2[K, V, Kp, Vp any](ctx context.Context, in iter.Seq2[K, V], ...) iter.Seq2[Kp, Vp]
- func FromSlice[V any](s []any) iter.Seq[int]
- func FromSlice2[V any](s []V) iter.Seq2[int, V]
- func JustK[K, V any](in iter.Seq2[K, V]) iter.Seq[K]
- func JustV[K, V any](in iter.Seq2[K, V]) iter.Seq[V]
- func ToSlice[V any](i iter.Seq[V]) []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachContext ¶
func ForEachContext[V, Vp any]( ctx context.Context, in iter.Seq[V], do func(context.Context, V) Vp, ) iter.Seq[Vp]
ForEachContext is like ForEach, but also passes in a context as the first argument.
func ForEachContext2 ¶
func ForEachContext2[K, V, Kp, Vp any]( ctx context.Context, in iter.Seq2[K, V], do func(context.Context, K, V) (Kp, Vp), ) iter.Seq2[Kp, Vp]
ForEachContext executes "do" for each entry of "in", passing in a context as the first argument.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.