mapslicehelp

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsKeys

func AsKeys[T constraints.Ordered](elements []T) map[T]any

func CountVals

func CountVals[K, V comparable](m *orderedmap.OrderedMap[K, V], v V) int

func DeleteFromSliceByIndex

func DeleteFromSliceByIndex[V any, X any](s []V, indexesToDelete map[int]X, indexOffset int) []V

func FindLastKeyWithMaxValue

func FindLastKeyWithMaxValue[K comparable, V constraints.Ordered](m *orderedmap.OrderedMap[K, V]) (maxK K, maxV V, numWinners uint)

func LastElement

func LastElement[T any](elements []T) *T

func LastMatch

func LastMatch[T comparable](haystack, needle []T) T

func OrderedMapKeys

func OrderedMapKeys[K comparable, V any](m *orderedmap.OrderedMap[K, V]) []K

func RemoveSequences

func RemoveSequences[V any, K comparable](s []V, sequencesToRemove *sortedmap.SortedMap[K, [2]int]) (newS []V)

func ReverseClone

func ReverseClone[S ~[]E, E any](s S) S

Types

This section is empty.

Jump to

Keyboard shortcuts

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