fmap

package
v0.0.0-...-acc9ff3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fmap is a utility for flattening maps into slices of key-value pairs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlattenedKVs

type FlattenedKVs[K, V cmp.Ordered] []flatKV[K, V]

FlattenedKVs can be used to convert a map into a sorted slice of key-value pairs

func New

func New[K, V cmp.Ordered](m map[K]V) FlattenedKVs[K, V]

New returns a sorted slice of key-value pairs from a map

func (FlattenedKVs[K, V]) CmpK

func (FlattenedKVs[K, V]) CmpK(desc bool) func(a, b flatKV[K, V]) int

CmpK returns the sort function for the keys

func (FlattenedKVs[K, V]) CmpV

func (FlattenedKVs[K, V]) CmpV(desc bool) func(a, b flatKV[K, V]) int

CmpV returns the sort function for the values

Jump to

Keyboard shortcuts

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