memoise

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFn

type CallbackFn func() (any, error)

Memoisation function type.

type Memoise

type Memoise interface {
	// Check if we have a memorised value for a given key.  If not, then
	// inovke the callback function and memorise its result.
	Check(string, CallbackFn) (any, error)
}

Memoisation type.

func NewMemoise

func NewMemoise() Memoise

Create a new memoisation object.

Jump to

Keyboard shortcuts

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