Documentation ¶
Overview ¶
Package lazy provides lazy evaluation for builtin types.
Most code in this package is automatically generated with merovius.de/go-misc/cmd/go-lazy.
The API is still not finalized, I reserve the right to change things for now.
Index ¶
- func Bool(f func() bool) func() bool
- func Byte(f func() byte) func() byte
- func Complex128(f func() complex128) func() complex128
- func Complex64(f func() complex64) func() complex64
- func Error(f func() error) func() error
- func Float32(f func() float32) func() float32
- func Float64(f func() float64) func() float64
- func Int(f func() int) func() int
- func Int16(f func() int16) func() int16
- func Int32(f func() int32) func() int32
- func Int64(f func() int64) func() int64
- func Int8(f func() int8) func() int8
- func Interface(f func() interface{}) func() interface{}
- func Rune(f func() rune) func() rune
- func String(f func() string) func() string
- func Uint(f func() uint) func() uint
- func Uint16(f func() uint16) func() uint16
- func Uint32(f func() uint32) func() uint32
- func Uint64(f func() uint64) func() uint64
- func Uint8(f func() uint8) func() uint8
- func Uintptr(f func() uintptr) func() uintptr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool provides lazy evaluation for bool. f is called exactly once, when the result is first used.
func Byte ¶
Byte provides lazy evaluation for byte. f is called exactly once, when the result is first used.
func Complex128 ¶
func Complex128(f func() complex128) func() complex128
Complex128 provides lazy evaluation for complex128. f is called exactly once, when the result is first used.
func Complex64 ¶
Complex64 provides lazy evaluation for complex64. f is called exactly once, when the result is first used.
func Error ¶
Error provides lazy evaluation for error. f is called exactly once, when the result is first used.
func Float32 ¶
Float32 provides lazy evaluation for float32. f is called exactly once, when the result is first used.
func Float64 ¶
Float64 provides lazy evaluation for float64. f is called exactly once, when the result is first used.
func Int ¶
Int provides lazy evaluation for int. f is called exactly once, when the result is first used.
func Int16 ¶
Int16 provides lazy evaluation for int16. f is called exactly once, when the result is first used.
func Int32 ¶
Int32 provides lazy evaluation for int32. f is called exactly once, when the result is first used.
func Int64 ¶
Int64 provides lazy evaluation for int64. f is called exactly once, when the result is first used.
func Int8 ¶
Int8 provides lazy evaluation for int8. f is called exactly once, when the result is first used.
func Interface ¶
func Interface(f func() interface{}) func() interface{}
Interface provides lazy evaluation for interface{}. f is called exactly once, when the result is first used.
func Rune ¶
Rune provides lazy evaluation for rune. f is called exactly once, when the result is first used.
func String ¶
String provides lazy evaluation for string. f is called exactly once, when the result is first used.
func Uint ¶
Uint provides lazy evaluation for uint. f is called exactly once, when the result is first used.
func Uint16 ¶
Uint16 provides lazy evaluation for uint16. f is called exactly once, when the result is first used.
func Uint32 ¶
Uint32 provides lazy evaluation for uint32. f is called exactly once, when the result is first used.
func Uint64 ¶
Uint64 provides lazy evaluation for uint64. f is called exactly once, when the result is first used.
Types ¶
This section is empty.