Documentation
¶
Overview ¶
Package function implements some functions for control the function execution and some is for functional programming.
Index ¶
- func After(n int, fn any) func(args ...any) []reflect.Value
- func Before(n int, fn any) func(args ...any) []reflect.Value
- func Compose(fnList ...func(...any) any) func(...any) any
- func Debounced(fn func(), duration time.Duration) func()
- func Delay(delay time.Duration, fn any, args ...any)
- func Pipeline[T any](funcs ...func(T) T) func(T) T
- func Schedule(d time.Duration, fn any, args ...any) chan bool
- type Fn
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debounced ¶
Debounced creates a debounced function that delays invoking fn until after wait duration have elapsed since the last time the debounced function was invoked.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is used for record code excution time
func (*Watcher) GetElapsedTime ¶
GetElapsedTime get excute elapsed time.
Click to show internal directories.
Click to hide internal directories.