slices2

package
v0.0.0-...-1704659 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupSorted

func DedupSorted[T comparable, S ~[]T](xs S) S

DedupSorted removes duplicate items according to eq It doesn't actually matter how the items are sorted as long as items which could be the same are adjacent.

func DedupSortedFunc

func DedupSortedFunc[T any, S ~[]T](xs S, eq func(a, b T) bool) S

DedupSortedFunc removes duplicate items according to eq It doesn't actually matter how the items are sorted as long as items which could be the same are adjacent.

func FoldLeft

func FoldLeft[X, Acc any, S ~[]X](xs S, init Acc, fn func(Acc, X) Acc) Acc

func FoldRight

func FoldRight[X, Acc any, S ~[]X](xs S, init Acc, fn func(Acc, X) Acc) Acc

func Map

func Map[A, B any, SA ~[]A, SB []B](xs SA, fn func(A) B) (ys SB)

func Merge

func Merge[T any, S ~[]T](a, b S, lt func(a, b T) bool) (out S)

func ParMap

func ParMap[X, Y any, SX ~[]X](xs SX, fn func(X) (Y, error)) ([]Y, error)

ParMap calls fn on each item in xs in parallel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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