generic

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain[GV ~func() O.Option[T.Tuple2[GV, V]], GU ~func() O.Option[T.Tuple2[GU, U]], U, V any](f func(U) GV) func(GU) GV

func Empty

func Empty[GU ~func() O.Option[T.Tuple2[GU, U]], U any]() GU

Empty returns the empty iterator

func Flatten

func Flatten[GV ~func() O.Option[T.Tuple2[GV, GU]], GU ~func() O.Option[T.Tuple2[GU, U]], U any](ma GV) GU

func From

func From[GU ~func() O.Option[T.Tuple2[GU, U]], U any](data ...U) GU

From constructs an array from a set of variadic arguments

func FromArray

func FromArray[GU ~func() O.Option[T.Tuple2[GU, U]], US ~[]U, U any](as US) GU

FromArray returns an iterator from multiple elements

func MakeBy

func MakeBy[GU ~func() O.Option[T.Tuple2[GU, U]], FCT ~func(int) U, U any](n int, f FCT) GU

MakeBy returns an [Iterator] with `n` elements initialized with `f(i)`

func Map

func Map[GV ~func() O.Option[T.Tuple2[GV, V]], GU ~func() O.Option[T.Tuple2[GU, U]], U, V any](f func(U) V) func(ma GU) GV

func MonadChain

func MonadChain[GV ~func() O.Option[T.Tuple2[GV, V]], GU ~func() O.Option[T.Tuple2[GU, U]], U, V any](ma GU, f func(U) GV) GV

func MonadMap

func MonadMap[GV ~func() O.Option[T.Tuple2[GV, V]], GU ~func() O.Option[T.Tuple2[GU, U]], U, V any](ma GU, f func(U) V) GV

func Monoid

func Monoid[GU ~func() O.Option[T.Tuple2[GU, U]], U any]() M.Monoid[GU]

func Of

func Of[GU ~func() O.Option[T.Tuple2[GU, U]], U any](a U) GU

Of returns an iterator with one single element

func Reduce

func Reduce[GU ~func() O.Option[T.Tuple2[GU, U]], U, V any](f func(V, U) V, initial V) func(GU) V

Reduce applies a function for each value of the iterator with a floating result

func Replicate

func Replicate[GU ~func() O.Option[T.Tuple2[GU, U]], U any](n int, a U) GU

Replicate creates an [Iterator] containing a value repeated the specified number of times.

func ToArray

func ToArray[GU ~func() O.Option[T.Tuple2[GU, U]], US ~[]U, U any](u GU) US

ToArray converts the iterator to an array

Types

This section is empty.

Jump to

Keyboard shortcuts

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