Documentation ¶
Index ¶
- func Absent[T any](iter hie.Iter[T], predicate Predicate[T]) bool
- func All[T any](iter hie.Iter[T], predicate Predicate[T]) bool
- func Clone[T any](i hie.Iter[T]) (hie.Iter[T], bool)
- func Cloned[T hie.Clonable[T]](in hie.Iter[T]) hie.Iter[T]
- func Close[T any](i hie.Iter[T]) error
- func CloseAll[T io.Closer](in hie.Iter[T]) error
- func Collect[T any](iter hie.Iter[T]) []T
- func Concat[T any](left hie.Iter[T], right hie.Iter[T], others ...hie.Iter[T]) hie.Iter[T]
- func Contains[T comparable](iter hie.Iter[T], elem T) bool
- func Difference[T comparable](first hie.Iter[T], second hie.Iter[T]) hie.Iter[T]
- func Empty[T any]() hie.Iter[T]
- func Exists[T any](iter hie.Iter[T], predicate Predicate[T]) bool
- func Filter[T any](iter hie.Iter[T], predicate Predicate[T]) hie.Iter[T]
- func FilterMap[T, R any](iter hie.Iter[T], fn FilterMapper[T, R]) hie.Iter[R]
- func Find[T any](iter hie.Iter[T], predicate Predicate[T]) opt.Option[T]
- func First[T any](iter hie.Iter[T]) opt.Option[T]
- func FlatMap[T, R any](iter hie.Iter[T], fn FlatMapper[T, R]) hie.Iter[R]
- func Flatten[T any](iter hie.Iter[hie.Iter[T]]) hie.Iter[T]
- func Fold[A, T any](iter hie.Iter[T], initialValue A, folder AccumulatorLeft[A, T]) A
- func ForEach[T any](iter hie.Iter[T], fn hie.Iterator[T])
- func Intersect[T comparable](first hie.Iter[T], second hie.Iter[T]) hie.Iter[T]
- func IsClonable[T any](i hie.Iter[T]) bool
- func IsClosable[T any](i hie.Iter[T]) bool
- func IsDisjoint[T comparable](iter hie.Iter[T], other hie.Iter[T]) bool
- func IsSubset[T comparable](iter hie.Iter[T], subset hie.Iter[T]) bool
- func Map[T, R any](iter hie.Iter[T], fn Mapper[T, R]) hie.Iter[R]
- func SymmetricDifference[T comparable](first hie.Iter[T], second hie.Iter[T]) hie.Iter[T]
- func TakeN[T any](iter hie.Iter[T], n int) hie.Iter[T]
- func Union[T comparable](left hie.Iter[T], right hie.Iter[T], others ...hie.Iter[T]) hie.Iter[T]
- type AccumulatorLeft
- type FilterMapper
- type FlatMapper
- type Mapper
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Absent ¶
Absent returns true if the predicate returns false for all the elements in the collection or if the collection is empty
func All ¶
All returns true if the predicate returns true for all of the elements in the collection or if the collection is empty.
func Contains ¶
func Contains[T comparable](iter hie.Iter[T], elem T) bool
Contains returns true if an element is present in the collection
func Difference ¶
Difference returns the difference between two collections. The returned slice are the elements that are in the first collection but not in the second
func IsDisjoint ¶
IsDisjoint returns true if none of the elements of the subset set are contained by the superset
func IsSubset ¶
IsSubset returns true if all elements of a subset are contained into a collection or if the subset is empty.
func SymmetricDifference ¶
SymmetricDifference removes the overlap between the 2 collections The returned slice are the elements that are in either the first or the second collection, but not in both