lamda

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map(array []interface{}, pred MapPredicate) []interface{}

Map creates a new array populated with the results of calling a provided function on every element in the calling array

func MapBool

func MapBool(array []bool, pred MapBoolPredicate) []bool

MapBool creates a new array populated with the results of calling a provided function on every element in the calling array

func MapByte

func MapByte(array []byte, pred MapBytePredicate) []byte

MapByte creates a new array populated with the results of calling a provided function on every element in the calling array

func MapFloat32

func MapFloat32(array []float32, pred MapFloat32Predicate) []float32

MapFloat32 creates a new array populated with the results of calling a provided function on every element in the calling array

func MapFloat64

func MapFloat64(array []float64, pred MapFloat64Predicate) []float64

MapFloat64 creates a new array populated with the results of calling a provided function on every element in the calling array

func MapInt

func MapInt(array []int, pred MapIntPredicate) []int

MapInt creates a new array populated with the results of calling a provided function on every element in the calling array

func MapInt16

func MapInt16(array []int16, pred MapInt16Predicate) []int16

MapInt16 creates a new array populated with the results of calling a provided function on every element in the calling array

func MapInt32

func MapInt32(array []int32, pred MapInt32Predicate) []int32

MapInt32 creates a new array populated with the results of calling a provided function on every element in the calling array

func MapInt64

func MapInt64(array []int64, pred MapInt64Predicate) []int64

MapInt64 creates a new array populated with the results of calling a provided function on every element in the calling array

func MapString

func MapString(array []string, pred MapStringPredicate) []string

MapString creates a new array populated with the results of calling a provided function on every element in the calling array

func Reduce

func Reduce(array []interface{}, pred ReducePredicate, initial interface{}) interface{}

Reduce method executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.

Types

type MapBoolPredicate

type MapBoolPredicate func(bool) bool

MapBoolPredicate function

type MapBytePredicate

type MapBytePredicate func(byte) byte

MapBytePredicate function

type MapFloat32Predicate

type MapFloat32Predicate func(float32) float32

MapFloat32Predicate function

type MapFloat64Predicate

type MapFloat64Predicate func(float64) float64

MapFloat64Predicate function

type MapInt16Predicate

type MapInt16Predicate func(int16) int16

MapInt16Predicate function

type MapInt32Predicate

type MapInt32Predicate func(int32) int32

MapInt32Predicate function

type MapInt64Predicate

type MapInt64Predicate func(int64) int64

MapInt64Predicate function

type MapIntPredicate

type MapIntPredicate func(int) int

MapIntPredicate function

type MapPredicate

type MapPredicate func(interface{}) interface{}

MapPredicate function

type MapStringPredicate

type MapStringPredicate func(string) string

MapStringPredicate function

type ReducePredicate

type ReducePredicate func(previousValue, currentValue interface{}, idx int) interface{}

ReducePredicate function

Jump to

Keyboard shortcuts

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