collections

package
v0.6.79 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any[T any](f func(T) bool, list []T)

func C added in v0.6.53

func C[T any](fns ...func(some T) T) func(some T) T

func C2 added in v0.6.53

func C2[T any, S any, R any](fn1 func(some S) R, fn2 func(some T) S) func(some T) R

func C3 added in v0.6.53

func C3[T any, S any, R any, U any](fn0 func(some R) U, fn1 func(some S) R, fn2 func(some T) S) func(some T) U

func C4 added in v0.6.53

func C4[T any, S any, R any, U any, V any](fn01 func(some U) V, fn0 func(some R) U, fn1 func(some S) R, fn2 func(some T) S) func(some T) V

func C5 added in v0.6.53

func C5[T any, S any, R any, U any, V any, W any](fn02 func(some V) W, fn01 func(some U) V, fn0 func(some R) U, fn1 func(some S) R, fn2 func(some T) S) func(some T) W

func Compose added in v0.6.53

func Compose[T any, S any, R any](fn1 func(some S) R, fn2 func(some T) S) func(some T) R

func Concat

func Concat[T any](left []T, right []T) []T

func Cons added in v0.6.53

func Cons[X any](x X, list []X) []X

func Contains added in v0.6.74

func Contains[T comparable](s []T, e T) bool

func DictMerge

func DictMerge[K comparable, V any](left map[K]V, right map[K]V) map[K]V

func Difference

func Difference[T comparable](from []T, remove []T) []T

func Duplicate

func Duplicate[T any](x T) []T

func Enconcat added in v0.6.53

func Enconcat[X any](before []X, x X, after []X) []X

func Fanout

func Fanout[T any, R any](fs []func(T) R, item T) []R

func Filter

func Filter[T any](fn func(some T) bool, list []T) []T

func FilterEmpty added in v0.6.74

func FilterEmpty[T comparable](l []T) []T

func First added in v0.6.53

func First[X any](list []X) *X

func Flatmap

func Flatmap[T any, R any](fn func(some T) []R, list []T) []R

func Flip added in v0.6.53

func Flip[X any, Y any, Z any](fn func(X, Y) Z) func(Y, X) Z

func Fmap

func Fmap[T any, R any](fn func(some T) R, list []T) []R

func Foldl

func Foldl[T any, R any](fn func(acc R, next T) R, base R, list []T) R

func Foldr

func Foldr[T any, R any](fn func(next T, carry R) R, base R, list []T) R

func Id added in v0.6.53

func Id[T any](x T) T

func Keys added in v0.6.53

func Keys[T comparable, R any](dict map[T]R) []T

func P2 added in v0.6.53

func P2[X any, Y any, Z any](fn func(X, Y) Z, x X) func(Y) Z

func S added in v0.6.53

func S[T any](fns ...func(some T) T) func(some T) T

func SortBy added in v0.6.53

func SortBy[X any](sortFn func(X, X) bool, list []X) []X

func ToDict

func ToDict[T comparable](xs []T) map[T]bool

func Uniq

func Uniq[T comparable](xs []T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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