# Functions
Accum accumulates the result of repeatedly applying a simple function to the elements of an iterator.
Accumx is the extended form of [Accum].
All makes a Go 1.23 iterator from an Of[T], suitable for use in a one-variable for-range loop.
AllCount makes a Go 1.23 counting iterator from an Of[T], suitable for use in a two-variable for-range loop.
AllPairs makes a Go 1.23 pair iterator from an Of[Pair[T, U]], suitable for use in a two-variable for-range loop.
Concat concatenates the members of the input iterators.
Dup duplicates the contents of an iterator, producing n new iterators, each containing the members of the original.
Filter copies the input iterator to the output, including only those elements that cause f to return true.
FirstN produces an iterator containing the first n elements of the input (or all of the input, if there are fewer than n elements).
From creates an iterator over the given items.
FromChan copies a Go channel to an iterator.
FromMap produces an iterator of key-value pairs from a Go map.
FromMapKeys produces an iterator over the keys of a Go map.
FromSeq converts a Go 1.23 iterator into an Of[T].
FromSeq2 converts a Go 1.23 pair iterator into an Of[Pair[T, U]].
FromSeq2Context converts a Go 1.23 pair iterator into an Of[Pair[T, U]].
FromSeqContext converts a Go 1.23 iterator into an Of[T].
FromSlice creates an iterator over the elements of a slice.
Gen produces an iterator of values obtained by repeatedly calling f.
Go runs a function in a goroutine and returns an iterator over the values it produces.
Ints produces an infinite iterator over integers beginning at start, with each element increasing by delta.
LastN produces a slice containing the last n elements of the input iterator (or all of the input, if there are fewer than n elements).
Lines produces an iterator over the lines of text in r.
LongLines produces an iterator of readers, each delivering a single line of text from r.
Map produces an iterator of values transformed from an input iterator by a simple mapping function.
Mapx is the extended form of [Map].
Page consumes inp one "page" at a time of up to pageSize elements, repeatedly calling a callback with a slice of the items consumed.
Prepared is like [SQL] but uses a prepared [sql.Stmt] instead of a database and string query.
Pull converts the “push-style” iterator sequence seq into a “pull-style” iterator accessed by the two functions next and stop.
Pull2 converts the “push-style” iterator sequence seq into a “pull-style” iterator accessed by the two functions next and stop.
Repeat produces an infinite iterator repeatedly containing the given value.
SkipN copies the input iterator to the output, skipping the first N elements.
SkipUntil copies the input iterator to the output, discarding the initial elements until the first one that causes f to return true.
SQL performs a query against db and returns the results as an iterator of type T.
ToChan creates a Go channel and copies the contents of an iterator to it.
ToChanContext creates a Go channel and copies the contents of an iterator to it.
ToMap consumes an iterator of key-value pairs and produces a Go map of the values.
ToSlice consumes the elements of an iterator and returns them as a slice.
WithContext associates a context option with a channel iterator.
WithError tells a channel iterator how to compute its Err value after its channel closes.
Zip takes two iterators and produces a new iterator containing pairs of corresponding elements.
# Interfaces
Of is the interface implemented by iterators.
QueryerContext is a minimal interface satisfied by *sql.DB (from database/sql).