gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/stream/func.go (about)

     1  package stream
     2  
     3  type (
     4  	Action[V any]           func(V)
     5  	Filter[V any]           func(V) bool
     6  	Mapper[I, O any]        func(I) O
     7  	Handler[V any]          func(V) error
     8  	ErrorHandler[V any]     func(v V, err error) error
     9  	HandlerMapper[I, O any] func(I) (O, error)
    10  	Reducer[V any, R any]   func(cur R, v V) R
    11  )
    12  
    13  type (
    14  	Iter[V any]   func() (v V, ok bool)
    15  	Ranger[V any] func(Handler[V]) error
    16  )