dict

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[K comparable, V any](data map[K]V, s V) bool

func ContainsKey

func ContainsKey[K comparable, V any](data map[K]V, k K) bool

func Copy

func Copy[K comparable, V any](data map[K]V) map[K]V

func Filter

func Filter[K comparable, V any](data map[K]V, f func(K, V) bool) map[K]V

func FilterNot added in v0.1.2

func FilterNot[K comparable, V any](data map[K]V, f func(K, V) bool) map[K]V

func Find

func Find[K comparable, V any](data map[K]V, f func(K, V) bool) mo.Option[tuple.T2[K, V]]

func Fold

func Fold[K comparable, V any, Z any](data map[K]V, z Z, f func(Z, K, V) Z) Z

func Get

func Get[K comparable, V any](data map[K]V, k K) mo.Option[tuple.T2[K, V]]

func GetOrElse

func GetOrElse[K comparable, V any](data map[K]V, k K, def V) V

func IsEmpty

func IsEmpty[K comparable, V any](data map[K]V) bool

func Keys

func Keys[K comparable, V any](data map[K]V) []K

func Limit added in v0.1.2

func Limit[K comparable, V any](data map[K]V, l int) map[K]V

func Map

func Map[K comparable, V any, Z any](data map[K]V, f func(K, V) Z) map[K]Z

func Merge

func Merge[K comparable, V any](data map[K]V, m map[K]V) map[K]V

func Remove

func Remove[K comparable, V any](data map[K]V, key K) map[K]V

func Set

func Set[K comparable, V any](data map[K]V, key K, value V) map[K]V

func Size

func Size[K comparable, V any](data map[K]V) int

func ToSlice

func ToSlice[K comparable, V any](data map[K]V) []tuple.T2[K, V]

func Values

func Values[K comparable, V any](data map[K]V) []V

Types

This section is empty.

Jump to

Keyboard shortcuts

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