Help us shape the future of Go! Take the 2026 Go Developer Survey

function

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func After

func After(n int, fn interface{}) func(args ...interface{}) []reflect.Value

After creates a function that invokes func once it's called n or more times

func Before

func Before(n int, fn interface{}) func(args ...interface{}) []reflect.Value

Before creates a function that invokes func once it's called less than n times

func Compose

func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{}

Compose compose the functions from right to left

func Delay

func Delay(delay time.Duration, fn interface{}, args ...interface{})

Delay make the function execution after delayed time

func Schedule

func Schedule(d time.Duration, fn interface{}, args ...interface{}) chan bool

Schedule invoke function every duration time, util close the returned bool chan

Types

type Fn

type Fn func(...interface{}) interface{}

func (Fn) Curry

func (f Fn) Curry(i interface{}) func(...interface{}) interface{}

Curry make a curryed function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL