Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorSeq2 ¶
ErrorSeq2 creates a 2-value iterator that yields a single (zero-value, error) pair. Useful for returning early from a sequence pipeline with an error.
func Iter2ToIter2Err ¶
Iter2ToIter2Err converts an iterator of (TIn, error) to (TOut, error), casting each item to TOut. If the error is non-nil, it is passed through with a zero-value TOut. Assumes TIn can be cast to TOut via empty interface.
func Iter2ToSlice ¶
func Iter2ToSlice[TOut any, TIn iter.Seq2[K, V], K, V any]( items TIn, cb func(k K, v V) TOut, ) []TOut
Iter2ToSlice converts a 2-value iterator into a slice using the provided mapping function. The iterator should yield (K, V) pairs, and cb maps each pair to an output element. Returns nil if the result is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.