types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker[T any] func(T) bool

Checker defines a function type that tests a value and returns a boolean.

type Equaler added in v1.0.2

type Equaler[E any] func(E, E) bool

Equaler is a function type that defines how to compare two values of type E for equality.

type Mapper

type Mapper[K, V any] func(K) V

Mapper defines a function type that transforms a value.

type Number

type Number interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
		~float32 | ~float64
}

Number represents numeric types including integers, unsigned integers, and floating-point numbers.

type Reducer

type Reducer[T any] func(val1, val2 T) T

Reducer defines a function type that reduces two values to one.

Jump to

Keyboard shortcuts

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