operation

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoFlatMap

func DoFlatMap(arr []interface{}, mapper func(interface{}) []interface{}) []interface{}

func DoFlatMapInParallel

func DoFlatMapInParallel(arr []interface{}, num int, mapper func(interface{}) []interface{}, ordered bool) []interface{}

func DoMap

func DoMap(arr []interface{}, mapper func(interface{}) interface{}) []interface{}

func DoMapInParallel

func DoMapInParallel(arr []interface{}, num int, mapper func(interface{}) interface{}, ordered bool) []interface{}

func Filter

func Filter(arr []interface{}, filter func(interface{}) bool) []interface{}

func FilterInParallel

func FilterInParallel(arr []interface{}, num int, filter func(interface{}) bool, ordered bool) []interface{}

func FindAny

func FindAny(arr []interface{}) *util.Optional

func FindFirst

func FindFirst(arr []interface{}) *util.Optional

func ForEachParallel

func ForEachParallel(arr []interface{}, num int, consumer func(interface{}))

func Limit

func Limit(arr []interface{}, limit int) []interface{}

func MaxOrMin

func MaxOrMin(arr []interface{}, less func(interface{}, interface{}) bool, max bool) *util.Optional

func Reduce

func Reduce(arr []interface{}, init interface{}, reducer func(acc, cur interface{}) interface{}) interface{}

func ReduceCombine

func ReduceCombine(arr []interface{}, init interface{}, reducer func(interface{}, interface{}) interface{}, combiner func(interface{}, interface{}) interface{}) interface{}

func ReduceOptional

func ReduceOptional(arr []interface{}, reducer func(acc, cur interface{}) interface{}) *util.Optional

func Skip

func Skip(arr []interface{}, skip int) []interface{}

func ToMap

func ToMap(arr []interface{}, keyMapper func(interface{}) interface{}, valueMapper func(interface{}) interface{}) map[interface{}]interface{}

func ToTypedArray

func ToTypedArray(arr []interface{}, t reflect.Type) reflect.Value

func ToTypedMap

func ToTypedMap(arr []interface{}, t reflect.Type, keyMapper func(interface{}) interface{}, valueMapper func(interface{}) interface{}) reflect.Value

Types

type ArrayResultWrapper

type ArrayResultWrapper struct {
	// contains filtered or unexported fields
}

type FilterResultWrapper

type FilterResultWrapper struct {
	// contains filtered or unexported fields
}

func (FilterResultWrapper) Compare

func (wrapper FilterResultWrapper) Compare(other queue.Item) int

type GeneralResultWrapper

type GeneralResultWrapper struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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