uslice

package
v0.2.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map[E, V any](slice []E, f func(E) V) []V

Map applies a provided function f to each element in the input slice and returns a slice of modified values.

func ToKeySet

func ToKeySet[E comparable](slice []E) map[E]struct{}

ToKeySet converts a slice of elements into a set (represented as a map with empty structs). This function ensures that all elements in the resulting map are unique.

Types

This section is empty.

Jump to

Keyboard shortcuts

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