operator

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v0.2.3

func Bool[T constraints.Number](ok bool) T

Bool converts bool to number

func Greater added in v0.2.3

func Greater[T constraints.Ordered](x, y T) bool

Greater reports whether x greather than y

func If added in v0.2.2

func If[T any](yes bool, a, b T) T

If returns yes ? a : b

func IfNew added in v0.2.2

func IfNew[T any](yes bool, a, b func() T) T

IfNew returns yes ? a() : b()

func Less added in v0.2.3

func Less[T constraints.Ordered](x, y T) bool

Less reports whether x less than y

func Or

func Or[T comparable](a, b T) T

Or returns a || b

func OrNew

func OrNew[T comparable](a T, new func() T) T

OrNew returns a || new()

Types

This section is empty.

Jump to

Keyboard shortcuts

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