mapit

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mapit allows for native Go maps to be used with iterators.

Iterator functions:

  • In - yields key-value pairs of a native Go map
  • To - converts an iterator back to a native Go map
  • Keys - yields the keys of a native Go map
  • Values - yields the values of a native Go map

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func In

func In[K comparable, V any](m map[K]V) *genit.GIterator[itlib.Pair[K, V]]

In returns an [GIterator] yielding Pair items in the given map.

func Keys

func Keys[K comparable, V any](m map[K]V) *genit.GIterator[K]

Keys returns an [GIterator] yielding the keys of the given Go map.

func To

func To[K comparable, V any](it itkit.Iterator[itlib.Pair[K, V]]) (out map[K]V)

To consumes an [Iterator] returning its Pair elements as a Go map.

func Values

func Values[K comparable, V any](m map[K]V) *genit.GIterator[V]

Values returns an [GIterator] yielding the values of the given Go map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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