slices

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package slices provide utility functions for slices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[T, U any](in []T, fn func(T) U) []U

Map applies a function to a slice, returning a new slice of values returned by fn

func Matches

func Matches[T any](in []T, fn func(T) bool) bool

Matches calls fn on each value in in. Matches returns true the first time fn returns true. It returns false if no member of in causes fn to return true

Types

This section is empty.

Jump to

Keyboard shortcuts

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