collect

package
v0.1.2-0...-df60a3f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](c []T, ff func(T) bool) []T

func Group

func Group[KT comparable, T any](c []T, groupFunc func(T) KT) [][]T

func Map

func Map[TI any, TO any](c []TI, mf func(TI) TO) []TO

func Reduce

func Reduce[TI any, TO any](c []TI, init TO, rf func(acc TO, next TI) TO) TO

func Sort

func Sort[T any](c []T, sf func(a T, b T) bool) []T

Sorting without side effect and using generic types Consume more memory in comparison to standard sorting due to working on copy of data set

Types

This section is empty.

Jump to

Keyboard shortcuts

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