Documentation ¶
Overview ¶
Package function implements some functions for control the function execution and some is for functional programming.
Index ¶
- func After(n int, fn interface{}) func(args ...interface{}) []reflect.Value
- func Before(n int, fn interface{}) func(args ...interface{}) []reflect.Value
- func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{}
- func Debounced(fn func(), duration time.Duration) func()
- func Delay(delay time.Duration, fn interface{}, args ...interface{})
- func Schedule(d time.Duration, fn interface{}, args ...interface{}) chan bool
- type Fn
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compose ¶
func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{}
Compose compose the functions from right to left
func Debounced ¶ added in v1.2.2
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 Fn ¶
type Fn func(...interface{}) interface{}
Fn is for curry function which is func(...interface{}) interface{}
type Watcher ¶ added in v1.1.5
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is used for record code excution time
func (*Watcher) GetElapsedTime ¶ added in v1.1.5
GetElapsedTime get excute elapsed time.
Click to show internal directories.
Click to hide internal directories.