general

package
v0.0.0-...-6e231dc Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error)

func ContainsSubslice

func ContainsSubslice[T comparable](slice []T, subslice []T) bool

Checks if the first slice contains a subslice that is equal to the second slice.

func Count

func Count[T comparable](slice []T, comparable T) int

Counts certain numbers in an int slice.

func CountFunc

func CountFunc[T any](slice []T, predicate func(T) bool) int

func Filter

func Filter[T any](slice []T, predicate func(T) bool) []T

Filters elements from a slice according to predicate.

func SortDesc

func SortDesc(s []int) ([]int, []int)

Sorts int arrays in reverse, returns a copy of the original and the result.

func Sum

func Sum(slice []int) int

Sums numbers in an int slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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