xiter

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package xiter provides small iterator helpers used across the compiler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect[T any](seq iter.Seq[T]) []T

Collect gathers all values from a sequence.

func Count

func Count[T any](seq iter.Seq[T]) int

Count returns how many values are yielded by a sequence.

func Slice

func Slice[T any](items []T) iter.Seq[T]

Slice exposes a slice as an iterator sequence.

func SortedKeys

func SortedKeys[K cmp.Ordered, V any](m map[K]V) iter.Seq[K]

SortedKeys yields map keys in deterministic sorted order.

func ValuesBySortedKeys

func ValuesBySortedKeys[K cmp.Ordered, V any](m map[K]V) iter.Seq[V]

ValuesBySortedKeys yields map values following sorted key order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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