comparator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFloat32Comparator

func DefaultFloat32Comparator(a, b float32) int

func DefaultFloat64Comparator

func DefaultFloat64Comparator(a, b float64) int

func DefaultIntegerComparator

func DefaultIntegerComparator(a, b int) int

func DefaultStringComparator

func DefaultStringComparator(a, b string) int

Types

type ComparatorFunction

type ComparatorFunction[T any] func(a, b T) int

Comparators take two items, a and b, and returns a negative value if a<b, a positive value if a>b, and zero if a==b

Jump to

Keyboard shortcuts

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