t

package module
v0.0.0-...-ea383e0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 1 Imported by: 0

README

t

tools created with generics

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose[K Number, T any](idx K, a ...T) T

func Coalesce

func Coalesce[T any](a ...*T) *T

func FromP

func FromP[T any](a *T) T

FromP - from Pointer

func Greatest

func Greatest[T constraints.Ordered](a T, b ...T) T

func Iif

func Iif[T any](cond bool, ifT T, ifF T) T

func In

func In[T constraints.Ordered](a T, b ...T) bool

func Least

func Least[T constraints.Ordered](a T, b ...T) T

func Max

func Max[T constraints.Ordered](a T, b T) T

func Min

func Min[T constraints.Ordered](a T, b T) T

func ToP

func ToP[T any](a T) *T

ToP - to Pointer

Types

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

Jump to

Keyboard shortcuts

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