lazy

package
v0.0.0-...-30fd898 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Unlicense Imports: 2 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(f func() bool) func() bool

Bool provides lazy evaluation for bool. f is called exactly once, when the result is first used.

func Byte

func Byte(f func() byte) 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

func Complex64(f func() complex64) func() complex64

Complex64 provides lazy evaluation for complex64. f is called exactly once, when the result is first used.

func Error

func Error(f func() error) func() error

Error provides lazy evaluation for error. f is called exactly once, when the result is first used.

func Float32

func Float32(f func() float32) func() float32

Float32 provides lazy evaluation for float32. f is called exactly once, when the result is first used.

func Float64

func Float64(f func() float64) func() float64

Float64 provides lazy evaluation for float64. f is called exactly once, when the result is first used.

func Int

func Int(f func() int) func() int

Int provides lazy evaluation for int. f is called exactly once, when the result is first used.

func Int16

func Int16(f func() int16) func() int16

Int16 provides lazy evaluation for int16. f is called exactly once, when the result is first used.

func Int32

func Int32(f func() int32) func() int32

Int32 provides lazy evaluation for int32. f is called exactly once, when the result is first used.

func Int64

func Int64(f func() int64) func() int64

Int64 provides lazy evaluation for int64. f is called exactly once, when the result is first used.

func Int8

func Int8(f func() int8) 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

func Rune(f func() rune) func() rune

Rune provides lazy evaluation for rune. f is called exactly once, when the result is first used.

func String

func String(f func() string) func() string

String provides lazy evaluation for string. f is called exactly once, when the result is first used.

func Uint

func Uint(f func() uint) func() uint

Uint provides lazy evaluation for uint. f is called exactly once, when the result is first used.

func Uint16

func Uint16(f func() uint16) func() uint16

Uint16 provides lazy evaluation for uint16. f is called exactly once, when the result is first used.

func Uint32

func Uint32(f func() uint32) func() uint32

Uint32 provides lazy evaluation for uint32. f is called exactly once, when the result is first used.

func Uint64

func Uint64(f func() uint64) func() uint64

Uint64 provides lazy evaluation for uint64. f is called exactly once, when the result is first used.

func Uint8

func Uint8(f func() uint8) func() uint8

Uint8 provides lazy evaluation for uint8. f is called exactly once, when the result is first used.

func Uintptr

func Uintptr(f func() uintptr) func() uintptr

Uintptr provides lazy evaluation for uintptr. f is called exactly once, when the result is first used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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