async

package
v0.0.0-...-dc7ff8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[E any, U any](it iter.Seq[E], fn func(E) U) iter.Seq[U]

Map applies the function `fn` to each element of the iterator `it`, producing a sequence of results of type U.

The function `fn` is executed asynchronously for all elements, meaning that multiple invocations of `fn` may run concurrently on different elements returned by `it`.

The resulting iter.Seq maintains the order of the original iterator `it`, ensuring that the output sequence matches the order of the input elements.

func Map2

func Map2[V any, W any, V2 any, W2 any](it iter.Seq2[V, W], fn func(V, W) (V2, W2)) iter.Seq2[V2, W2]

Map2 applies the function `fn` to each pair of elements (V, W) from the iterator `it`, producing a sequence of pairs of results (V2, W2).

The function `fn` is executed asynchronously for all pairs, meaning that multiple invocations of `fn` may run concurrently on different pairs returned by `it`.

The resulting iter.Seq2 maintains the order of the original iterator `it`, ensuring that the output sequence of pairs matches the order of the input pairs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL