package mapext

import "github.com/go-playground/pkg/v5/map"

Index

Functions

func Map

func Map[K comparable, V any, U any](m map[K]V, init U, fn func(accum U, key K, value V) U) U

Map allows mapping of a map[K]V -> U.

func Retain

func Retain[K comparable, V any](m map[K]V, fn func(key K, value V) bool)

Retain retains only the elements specified by the function and removes others.

Source Files

map.go

Version
v5.12.3
Published
Feb 18, 2023
Platform
darwin/amd64
Last checked
1 hour ago

Tools for package owners.