Module maps stdlib

maps
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
0
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

This section is empty.

Imported by

This section is empty.

Overview

maps is a module that provides utility functions to make working with maps easier.

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn filter[K, V]

fn filter[K, V](m map[K]V, f fn (K, V) bool) map[K]V

filter filters map entries by the given predicate function

#fn flat_map[K, V, I]

fn flat_map[K, V, I](m map[K]V, f fn (K, V) []I) []I

flat_map maps map entries into arrays and flattens into a one-dimensional array

#fn from_array[T]

fn from_array[T](array []T) map[int]T

from_array maps array into map with index to element per entry

#fn invert[K, V]

fn invert[K, V](m map[K]V) map[V]K

invert returns a new map, created by swapping key to value and vice versa for each entry.

#fn to_array[K, V, I]

fn to_array[K, V, I](m map[K]V, f fn (K, V) I) []I

to_array maps map entries into one-dimensional array

#fn to_map[K, V, X, Y]

fn to_map[K, V, X, Y](m map[K]V, f fn (K, V) (X, Y)) map[X]Y

to_map maps map entries into new entries and constructs a new map

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.