Documentation ¶
Index ¶
- func Filter[T any](ctx context.Context, elements []T, fn FilterFn[T]) (targets []T, err error)
- func Find[T any](ctx context.Context, elements []T, fn FindFn[T]) (target T, found bool, err error)
- func Foreach[T any](ctx context.Context, elements []T, fn ForeachFn[T]) (err error)
- func Map[S any, D any](ctx context.Context, src S, fn MapFn[S, D]) (dst D, err error)
- func MapSlice[S any, D any](ctx context.Context, src []S, fn MapFn[S, D]) (dst []D, err error)
- func Ternary(ctx context.Context, condition func(ctx context.Context) (ok bool), ...) (returning bool, err error)
- func TernaryFalsy(ctx context.Context, condition func(ctx context.Context) (ok bool), ...) (returning bool, err error)
- func TernaryTruthy(ctx context.Context, condition func(ctx context.Context) (ok bool), ...) (returning bool, err error)
- type FilterFn
- type FindFn
- type ForeachFn
- type MapFn
- type TernaryFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TernaryFalsy ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.