slicesx

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

A package that provides a way that extends the slices package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[S ~[]E, E any](items S, predicate func(E) bool) S

Filter removes any item that doesn't match the predicate

func Map

func Map[T any, U any](items []T, transform func(T) U) []U

Map applies a transformation function to each item in the slice

func Unique

func Unique[S ~[]E, E comparable](items S) S

Unique returns a new slice with only unique items

Types

This section is empty.

Jump to

Keyboard shortcuts

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