Documentation
¶
Overview ¶
Package stateless defines a stateless (pure) iterator, i.e. one that can be iterated over multiple times without side effects, it is threadsafe
Index ¶
- func Ap[V, U any](ma Iterator[U]) func(Iterator[func(U) V]) Iterator[V]
- func Chain[U, V any](f func(U) Iterator[V]) func(Iterator[U]) Iterator[V]
- func Filter[U any](f func(U) bool) func(ma Iterator[U]) Iterator[U]
- func FilterMap[U, V any](f func(U) O.Option[V]) func(ma Iterator[U]) Iterator[V]
- func Map[U, V any](f func(U) V) func(ma Iterator[U]) Iterator[V]
- func Monoid[U any]() M.Monoid[Iterator[U]]
- func Reduce[U, V any](f func(V, U) V, initial V) func(Iterator[U]) V
- func ToArray[U any](u Iterator[U]) []U
- type Iterator
- func Empty[U any]() Iterator[U]
- func Flatten[U any](ma Iterator[Iterator[U]]) Iterator[U]
- func From[U any](data ...U) Iterator[U]
- func FromArray[U any](as []U) Iterator[U]
- func MakeBy[FCT ~func(int) U, U any](n int, f FCT) Iterator[U]
- func MonadAp[V, U any](fab Iterator[func(U) V], ma Iterator[U]) Iterator[V]
- func MonadChain[U, V any](ma Iterator[U], f func(U) Iterator[V]) Iterator[V]
- func MonadMap[U, V any](ma Iterator[U], f func(U) V) Iterator[V]
- func Of[U any](a U) Iterator[U]
- func Replicate[U any](n int, a U) Iterator[U]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Map ¶
Map transforms an Iterator of type [U] into an Iterator of type [V] via a mapping function
Types ¶
type Iterator ¶
Iterator represents a stateless, pure way to iterate over a sequence
Click to show internal directories.
Click to hide internal directories.