builtin

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 0 Imported by: 1

README

go-builtin

some builtin in Golang developed with generics (golang 1.18)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T comparable](a, b T) bool

Generic function that performs a == b

func Greater

func Greater[T Ord](a, b T) bool

Generic function that performs a > b

func GreaterEqual

func GreaterEqual[T Ord](a, b T) bool

Generic function that performs a >= b

func Less

func Less[T Ord](a, b T) bool

Generic function that performs a < b

func LessEqual

func LessEqual[T Ord](a, b T) bool

Generic function that performs a <= b

Types

type Compf

type Compf[T any] func(a, b T) bool

Function type to do comparing operation

type Eqf

type Eqf[T any] func(a T) bool

Function type to do equality operation

type Float

type Float interface {
	~float32 | ~float64
}

type Integer

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

type Number

type Number interface {
	Integer | Float
}

type Ord

type Ord interface {
	Number | ~string
}

type Ordf

type Ordf[T any] func(a, b T) bool

Function type to do ordering operation

Jump to

Keyboard shortcuts

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