Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrFn ¶
func OrFn[T comparable](fn ...func() T) (out T, ok bool)
OrFn returns the first non-zero value from listed factory arguments.
func OrFnSeq ¶ added in v0.2.0
func OrFnSeq[T comparable](seq iter.Seq[func() T]) (out T, ok bool)
OrFnSeq returns the first non-zero value from listed factory arguments.
func SliceHeadOrFn ¶ added in v0.2.0
func SliceHeadOrFn[T comparable](s []T, fn func() T) (out T)
SliceHeadOrFn returns the head of the given slice if available and calls fn otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.