Documentation ¶
Index ¶
- type BiConsumer
- type BiConsumerCheckedFn
- type BiConsumerFn
- type BiFunction
- type BiFunctionCheckedFn
- type BiFunctionFn
- type Consumer
- func CheckZeroAccept[T any](zeroFn Runnable, notZeroFn Consumer[T]) Consumer[T]
- func ConsumerCast[T any](fn func(T) error) Consumer[T]
- func ConsumerChan[T any](ch chan T) Consumer[T]
- func ConsumerOf[T any](fn func(T)) Consumer[T]
- func Ignore[T any]() Consumer[T]
- func IsZeroThenRun[T any](zeroFn Runnable) Consumer[T]
- func JoinConsumers[T any](consumers ...Consumer[T]) Consumer[T]
- func MustAccept[T any](consumer Consumer[T]) Consumer[T]
- func NotZeroThenAccept[T any](notZeroFn Consumer[T]) Consumer[T]
- type ConsumerCh
- type ConsumerCheckedFn
- type ConsumerFn
- type Consumers
- type Function
- func CheckZeroApply[T any, R any](zeroFn Supplier[R], notZeroFn Function[T, R]) Function[T, R]
- func ComposeFunction[T any, R any, V any](before Function[T, R], after Function[R, V]) Function[T, V]
- func FunctionCast[T any, R any](fn func(T) (R, error)) Function[T, R]
- func FunctionOf[T any, R any](fn func(T) R) Function[T, R]
- func Identity[T any]() Function[T, T]
- func IsZeroThenGet[T any](zeroFn Supplier[T]) Function[T, T]
- func MustApply[T any, R any](function Function[T, R]) Function[T, R]
- func NotZeroThenApply[T any, R any](notZeroFn Function[T, R]) Function[T, R]
- func YCombinator[T any](f func(func(T) T) func(T) T) Function[T, T]
- type FunctionCheckedFn
- type FunctionComposed
- type FunctionFn
- type Runnable
- type RunnableCheckedFn
- type RunnableFn
- type Supplier
- type SupplierCheckedFn
- type SupplierFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiConsumer ¶
func BiConsumerCast ¶
func BiConsumerCast[T any, U any](fn func(T, U) error) BiConsumer[T, U]
func BiConsumerOf ¶
func BiConsumerOf[T any, U any](fn func(T, U)) BiConsumer[T, U]
type BiConsumerCheckedFn ¶
func (BiConsumerCheckedFn[T, U]) Accept ¶
func (fn BiConsumerCheckedFn[T, U]) Accept(t T, u U)
func (BiConsumerCheckedFn[T, U]) CheckedAccept ¶
func (fn BiConsumerCheckedFn[T, U]) CheckedAccept(t T, u U) error
type BiConsumerFn ¶
func (BiConsumerFn[T, U]) Accept ¶
func (fn BiConsumerFn[T, U]) Accept(t T, u U)
func (BiConsumerFn[T, U]) CheckedAccept ¶
func (fn BiConsumerFn[T, U]) CheckedAccept(t T, u U) error
type BiFunction ¶
type BiFunction[T any, U any, R any] interface { Apply(T, U) R CheckedApply(T, U) (R, error) Curry() func(T) Function[U, R] Partial(T) Function[U, R] }
func BiFunctionCast ¶
func BiFunctionCast[T any, U any, R any](fn func(T, U) (R, error)) BiFunction[T, U, R]
func BiFunctionOf ¶
func BiFunctionOf[T any, U any, R any](fn func(T, U) R) BiFunction[T, U, R]
type BiFunctionCheckedFn ¶
func (BiFunctionCheckedFn[T, U, R]) Apply ¶
func (fn BiFunctionCheckedFn[T, U, R]) Apply(t T, u U) R
func (BiFunctionCheckedFn[T, U, R]) CheckedApply ¶
func (fn BiFunctionCheckedFn[T, U, R]) CheckedApply(t T, u U) (R, error)
func (BiFunctionCheckedFn[T, U, R]) Curry ¶
func (fn BiFunctionCheckedFn[T, U, R]) Curry() func(T) Function[U, R]
func (BiFunctionCheckedFn[T, U, R]) Partial ¶
func (fn BiFunctionCheckedFn[T, U, R]) Partial(t T) Function[U, R]
type BiFunctionFn ¶
func (BiFunctionFn[T, U, R]) Apply ¶
func (fn BiFunctionFn[T, U, R]) Apply(t T, u U) R
func (BiFunctionFn[T, U, R]) CheckedApply ¶
func (fn BiFunctionFn[T, U, R]) CheckedApply(t T, u U) (R, error)
func (BiFunctionFn[T, U, R]) Curry ¶
func (fn BiFunctionFn[T, U, R]) Curry() func(T) Function[U, R]
func (BiFunctionFn[T, U, R]) Partial ¶
func (fn BiFunctionFn[T, U, R]) Partial(t T) Function[U, R]
type Consumer ¶
func CheckZeroAccept ¶
func ConsumerCast ¶
func ConsumerChan ¶
func ConsumerOf ¶
func IsZeroThenRun ¶
func JoinConsumers ¶ added in v0.2.0
func MustAccept ¶ added in v0.4.0
func NotZeroThenAccept ¶
type ConsumerCh ¶
type ConsumerCh[T any] chan<- T
func (ConsumerCh[T]) Accept ¶
func (ch ConsumerCh[T]) Accept(t T)
func (ConsumerCh[T]) CheckedAccept ¶
func (ch ConsumerCh[T]) CheckedAccept(t T) error
type ConsumerCheckedFn ¶
func (ConsumerCheckedFn[T]) Accept ¶
func (fn ConsumerCheckedFn[T]) Accept(t T)
func (ConsumerCheckedFn[T]) CheckedAccept ¶
func (fn ConsumerCheckedFn[T]) CheckedAccept(t T) error
type ConsumerFn ¶
type ConsumerFn[T any] func(T)
func (ConsumerFn[T]) Accept ¶
func (fn ConsumerFn[T]) Accept(t T)
func (ConsumerFn[T]) CheckedAccept ¶
func (fn ConsumerFn[T]) CheckedAccept(t T) error
type Consumers ¶ added in v0.2.0
func (Consumers[T]) CheckedAccept ¶ added in v0.2.0
type Function ¶
func CheckZeroApply ¶
func ComposeFunction ¶ added in v0.4.0
func FunctionOf ¶
func IsZeroThenGet ¶
func NotZeroThenApply ¶
func YCombinator ¶
type FunctionCheckedFn ¶
func (FunctionCheckedFn[T, R]) Apply ¶
func (fn FunctionCheckedFn[T, R]) Apply(t T) R
func (FunctionCheckedFn[T, R]) CheckedApply ¶
func (fn FunctionCheckedFn[T, R]) CheckedApply(t T) (R, error)
type FunctionComposed ¶ added in v0.4.0
func (FunctionComposed[T, R, V]) Apply ¶ added in v0.4.0
func (fn FunctionComposed[T, R, V]) Apply(t T) V
func (FunctionComposed[T, R, V]) CheckedApply ¶ added in v0.4.0
func (fn FunctionComposed[T, R, V]) CheckedApply(t T) (V, error)
type FunctionFn ¶
func (FunctionFn[T, R]) Apply ¶
func (fn FunctionFn[T, R]) Apply(t T) R
func (FunctionFn[T, R]) CheckedApply ¶
func (fn FunctionFn[T, R]) CheckedApply(t T) (R, error)
type Runnable ¶
type Runnable interface { Run() CheckedRun() error }
func RunnableCast ¶
func RunnableOf ¶
func RunnableOf(fn func()) Runnable
type RunnableCheckedFn ¶
type RunnableCheckedFn func() error
func (RunnableCheckedFn) CheckedRun ¶
func (fn RunnableCheckedFn) CheckedRun() error
func (RunnableCheckedFn) Run ¶
func (fn RunnableCheckedFn) Run()
type RunnableFn ¶
type RunnableFn func()
func (RunnableFn) CheckedRun ¶
func (fn RunnableFn) CheckedRun() error
func (RunnableFn) Run ¶
func (fn RunnableFn) Run()
type SupplierCheckedFn ¶
func (SupplierCheckedFn[T]) CheckedGet ¶
func (fn SupplierCheckedFn[T]) CheckedGet() (T, error)
func (SupplierCheckedFn[T]) Get ¶
func (fn SupplierCheckedFn[T]) Get() T
type SupplierFn ¶
type SupplierFn[T any] func() T
func (SupplierFn[T]) CheckedGet ¶
func (fn SupplierFn[T]) CheckedGet() (T, error)
func (SupplierFn[T]) Get ¶
func (fn SupplierFn[T]) Get() T
Click to show internal directories.
Click to hide internal directories.