cmp

package
v0.0.0-...-b03ede8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstOf

func FirstOf[T comparable](xs ...T) T

FirstOf returns the first argument that is not the zero value. If all arguments are zero, it returns the zero value.

func FirstOfBy

func FirstOfBy[T any](p prop.Predicate[T], xs ...T) T

FirstOfBy returns the first argument that satisfying p. If all arguments are zero, it returns the zero value.

func LastOf

func LastOf[T comparable](xs ...T) T

LastOf returns the last argument that is not the zero value. If all arguments are zero, it returns the zero value.

func LastOfBy

func LastOfBy[T any](p prop.Predicate[T], xs ...T) T

LastOfBy returns the last argument that satisfying p. If all arguments are zero, it returns the zero value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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