slicex

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](s []T, v T) bool

Contains returns true if an T is present in a iteratee.

func Filter

func Filter[T any](s []T, cb func(T) bool) []T

Filter iterates over a collection of T, returning an array of all T elements predicate returns truthy for.

func FilterInplace

func FilterInplace[T any](s []T, cb func(T) bool) []T

FilterInplace iterates over a collection of T, returns a slice(point to self'Data) of all T elements predicate returns truthy for. the operation occurs inplace, the argument s'Data would be modified.

Types

This section is empty.

Jump to

Keyboard shortcuts

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