Discover Packages
github.com/kelindar/expr
collection
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Sep 19, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package collection provides bounded, deterministic collection operations.
func Chunk(values []any, size int) ([][]any, error)
func Cumsum(values []any) ([]float64, error)
func Diff(values []any) ([]float64, error)
func Difference(left, right []any) ([]any, error)
func Intersection(left, right []any) ([]any, error)
func Lag(values []any, periods int) ([]any, error)
func Merge(left, right map[string]any) (map[string]any, error)
func Options() []exprlib.Option
func Union(left, right []any) ([]any, error)
func Zip(left, right []any) ([][]any, error)
Chunk splits values into ordered, non-empty chunks of at most size elements.
Cumsum returns the finite running sum of numeric values.
Diff returns finite adjacent differences of numeric values.
Difference returns unique values from left that are absent from right.
Intersection returns unique values present in both inputs, preserving left order.
Lag shifts values by periods and fills the leading positions with nil.
Merge copies two objects, with keys from right replacing keys from left.
Options returns the Expr registrations for collection helpers.
Union returns unique values from left followed by unique values from right.
Zip pairs values at matching positions and requires equal-length inputs.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.