MinBy¶
func MinBy[T any, O cmp.Ordered](slice []T, selector func(T) O) *T
MinBy returns a pointer to the element with the minimum value as determined by the selector function. Returns nil if the slice is empty.
func MinBy[T any, O cmp.Ordered](slice []T, selector func(T) O) *T
MinBy returns a pointer to the element with the minimum value as determined by the selector function. Returns nil if the slice is empty.