package
Version:
v0.1.2-0...-df60a3f
Opens a new window with list of versions in this module.
Published: Jul 17, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Filter[T any](c []T, ff func(T) bool) []T
-
func Group[KT comparable, T any](c []T, groupFunc func(T) KT) [][]T
-
func Map[TI any, TO any](c []TI, mf func(TI) TO) []TO
-
func Reduce[TI any, TO any](c []TI, init TO, rf func(acc TO, next TI) TO) TO
-
func Sort[T any](c []T, sf func(a T, b T) bool) []T
func Filter[T any](c []T, ff func(T) bool) []T
func Group[KT comparable, T any](c []T, groupFunc func(T) KT) [][]T
func Map[TI any, TO any](c []TI, mf func(TI) TO) []TO
func Reduce[TI any, TO any](c []TI, init TO, rf func(acc TO, next TI) TO) TO
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.