stream

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drain

func Drain[T any](up State[T], apply func(T) error)

Types

type State

type State[T any] interface {
	context.Context

	Disentangle() State[T]
	// contains filtered or unexported methods
}

func Finite added in v0.4.1

func Finite[T any](gen func() (T, bool)) State[T]

func Flatten

func Flatten[T any, U any](from State[T], apply func(T) (State[U], error), order bool) State[U]

func From

func From[T any](source <-chan T) State[T]

func Move

func Move[T any, U any](up State[T], apply func(T) (U, error)) State[U]

func Of

func Of[T any](gen func() (T, error)) State[T]

func Once

func Once[T any](v T) State[T]

func Reduce

func Reduce[L any, R any, O any](l State[L], r State[R], apply func(L, R) (O, error)) State[O]

Jump to

Keyboard shortcuts

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