slices

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package slices provides generic slice functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFunc

func AllFunc[S ~[]E, E any](x S, fn func(a E) bool) bool

AllFunc returns true if for all elements of a slice fn evaluates to true, false otherwise.

func AnyFunc

func AnyFunc[S ~[]E, E any](x S, fn func(a E) bool) bool

AnyFunc returns true if for at least one element of a slice fn evaluates to true, false otherwise.

func RangeFunc

func RangeFunc[S ~[]E, E any](x S, fn func(a E))

RangeFunc executes function fn on all elements of a slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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