Documentation
¶
Index ¶
- Variables
- func MakeAny(fn interface{})
- func MakeEach(fn interface{})
- func MakeEachP(fn interface{})
- func MakeEvery(fn interface{})
- func MakeMap(fn interface{})
- func MakeNone(fn interface{})
- func MakePMap(fn interface{})
- func MakePartition(fn interface{})
- func Maker(fn interface{}, impl func(args []reflect.Value) (results []reflect.Value))
- func SetWorkers(w int)
- func ToI(slice interface{}) []interface{}
- func Valueize(values ...interface{}) []reflect.Value
Constants ¶
This section is empty.
Variables ¶
var Any func(fn, slice_or_map interface{}) bool
var Any func(func(value interface{}) bool, interface{}) bool
var AnyInt func(func(value int) bool, []int) bool
AnyInt Returns true if all values in a []int pass the predicate truth test Predicate function accepts an int and returns a boolean
var AnyString func(func(value string) bool, []string) bool
AnyString Returns true if all values in a []string pass the predicate truth test Predicate function accepts a string and returns a boolean
var Each func(fn interface{}, slice_or_map interface{})
Each func(func(A, B), []A) Applies the given iterator function to each element of a collection (slice or map). If the collection is a Slice, the iterator function arguments are *value, index* If the collection is a Map, the iterator function arguments are *value, key* Iterator functions accept a value, and the index or key is an optional argument. Note: each does not return a value, you may want un.Map var Each func(func(value, i interface{}), interface{})
var EachInt func(func(value, i int), []int)
EachInt Applies the given iterator function to each element of []int Iterator function arguments are *value, index*
var EachP func(fn interface{}, slice_or_map interface{})
EachP Parallel Each *Concurrently* applies the given iterator function to each element of a collection (slice or map).
var EachStringInt func(func(value int, key string), map[string]int)
EachStringInt Applies the given iterator function to each element of map[string]int Iterator function arguments are *value, key*
var Every func(fn, slice_or_map interface{}) bool
var Every func(func(value interface{}) bool, interface{}) bool
var EveryInt func(func(value int) bool, []int) bool
EveryInt Returns true if all values in a []int pass the predicate truth test Predicate function accepts an int and returns a boolean
var EveryString func(func(value string) bool, []string) bool
EveryString Returns true if all values in a []string pass the predicate truth test Predicate function accepts a string and returns a boolean
var Map func(interface{}, interface{}) []interface{}
Map func(func(A) C, []A) []C Applies the given iterator function to each element of a collection (slice or map) and returns a new slice of the computed results. If the collection is a Slice, the iterator function arguments are *value, index* If the collection is a Map, the iterator function arguments are *value, key* Iterator functions accept a value, and the index or key is an optional argument.
var MapInt func(func(int) int, []int) []int
Applies the given iterator function to each element of a []int and returns a new []int of the computed results.
var MapP func(interface{}, interface{}, ...int) []interface{}
Applies the given iterator function to each element of a collection (slice or map) and returns a new slice of the computed results.
Applies the given iterator function to each element of a []string and returns a new []string of the computed results. <p>Uses a Worker Pool using either the global worker value (un.SetWorker) or as an optional parameter</p> <p>MapPString(fn, col, n)</p>
var MapString func(func(string) string, []string) []string
Applies the given iterator function to each element of a []string and returns a new []string of the computed results.
var None func(fn, slice_or_map interface{}) bool
var None func(func(value interface{}) bool, interface{}) bool
var NoneInt func(func(value int) bool, []int) bool
NoneInt Returns true if all values in a []int pass the predicate truth test Predicate function accepts an int and returns a boolean
var NoneString func(func(value string) bool, []string) bool
NoneString Returns true if all values in a []string pass the predicate truth test Predicate function accepts a string and returns a boolean
var Partition func(fn interface{}, slice_or_map interface{}) ([]interface{}, []interface{})
Partition func(func(A, B) bool, []A []A) Applies the given iterator function to partition element of a collection (slice or map). If the collection is a Slice, the iterator function arguments are *value, index* If the collection is a Map, the iterator function arguments are *value, key* Iterator functions accept a value, and the index or key is an optional argument. Note: partition does not return a value, you may want un.Map var Partition func(func(value, i interface{}), interface{})
var PartitionInt func(func(value, i int), []int) ([]int, []int)
// PartitionInt // Applies the given iterator function to partition element of []int // Iterator function arguments are *value, index*
Functions ¶
func MakeAny ¶
func MakeAny(fn interface{})
MakeAny: implements a typed Each function in the form Each func(func(A, B), []A)
func MakeEach ¶
func MakeEach(fn interface{})
MakeEach implements a typed Each function in the form Each func(func(A, B), []A)
func MakeEachP ¶
func MakeEachP(fn interface{})
MakeEachP implements a typed Parallel-Each function in the form EachP func(func(A, B), []A)
func MakeEvery ¶
func MakeEvery(fn interface{})
MakeEvery: implements a typed Each function in the form Each func(func(A, B), []A)
func MakeMap ¶
func MakeMap(fn interface{})
MakeMap implements a typed Map function in the form Map func(func(A) C, []A) []C
func MakeNone ¶
func MakeNone(fn interface{})
MakeNone: implements a typed Each function in the form Each func(func(A, B), []A)
func MakePMap ¶
func MakePMap(fn interface{})
MakePMap implements a typed Parallel Map function in the form Map func(func(A) C, []A) []C
func MakePartition ¶
func MakePartition(fn interface{})
MakePartition implements a typed Partition function in the form Partition func(func(A, B), []A)
func Maker ¶
Maker takes a function pointer (fn) and implements it with the given reflection-based function implementation Internally uses reflect.MakeFunc
func SetWorkers ¶
func SetWorkers(w int)
SetWorkers sets the number of workers used by the worker pools <p>This is a global default value</p> <p>If different worker pool sizes are required, use the optional worker argument when calling Parallel Implementations</p>
Types ¶
This section is empty.