Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValFn ¶
type ValFn[T any] func() T
type ValsFn ¶
type ValsFn[T1, T2 any] func() (T1, T2)
func OnceVals ¶
func OnceVals[T1, T2 any](newFn func() (T1, T2)) ValsFn[T1, T2]
OnceVals returns a function that invokes f only once and returns the values returned by f. The returned function may be called concurrently.
If f panics, the returned function will panic with the same value on every call.
func OnceValsFn ¶
func OnceValsFn[T1, T2 any](newFn func() (T1, T2)) ValsFn[T1, T2]
OnceValsFn returns a function that invokes f only once and returns the value returned by f. The returned function may be called concurrently.
Click to show internal directories.
Click to hide internal directories.