MCPcopy Index your code

hub / github.com/adam-hanna/arrayOperations / functions

Functions21 in github.com/adam-hanna/arrayOperations

↓ 4 callersFunctionDistinct
Distinct returns the unique vals of a slice fmt.Println(Distinct[int]([]int{1, 1, 2, 3})) // output: [1, 2, 3]
arrayOperations.go:90
↓ 4 callersFunctionisEqual
(a, b []T)
arrayOperations_unit_test.go:9
↓ 2 callersFunctionFindOne
FindOne iterates through an array applying the guard function to each element and returns the first element that passes. If no such element is found,
arrayOperations.go:12
↓ 2 callersFunctionguard
(i int)
arrayOperations_unit_test.go:117
↓ 1 callersFunctionDifference
Difference returns a slice of values that are only present in one of the input slices example #1 a := []int{1, 2, 2, 4, 6} b := []int{2, 4, 5} fmt.Pr
arrayOperations.go:200
↓ 1 callersFunctionFilter
Filter iterates through an array applying the guard function to each element and returns the elements that pass arr := []int{0,1,2,3,4} func isEven
arrayOperations.go:56
↓ 1 callersFunctionIntersect
Intersect returns a slice of values that are present in all of the input slices example #1 a := []int{1, 1, 3, 4, 5, 6} b := []int{2, 3, 6} fmt.Print
arrayOperations.go:122
↓ 1 callersFunctionMap
Map iterates through an array applying the transform function to each element and returns the modified array arr := []int{1,2,3} func addTen(i int)
arrayOperations.go:76
↓ 1 callersFunctionReduce
Reduce iterates through an array applying the function to each element and the cumulative value and the final state of the cumulative value arr := [
arrayOperations.go:38
↓ 1 callersFunctionUnion
Union returns a slice that contains the unique values of all the input slices example #1 a := []int{1, 2, 2, 4, 6} b := []int{2, 4, 5} fmt.Println(Un
arrayOperations.go:167
FunctionTestDifference
(t *testing.T)
arrayOperations_unit_test.go:234
FunctionTestDistinct
(t *testing.T)
arrayOperations_unit_test.go:152
FunctionTestFilter
(t *testing.T)
arrayOperations_unit_test.go:121
FunctionTestFindOne
(t *testing.T)
arrayOperations_unit_test.go:64
FunctionTestIntersect
(t *testing.T)
arrayOperations_unit_test.go:178
FunctionTestMap
(t *testing.T)
arrayOperations_unit_test.go:135
FunctionTestReduce
(t *testing.T)
arrayOperations_unit_test.go:102
FunctionTestUnion
(t *testing.T)
arrayOperations_unit_test.go:206
FunctionaddTen
(i int)
arrayOperations_unit_test.go:131
FunctioncountAnimals
(state map[string]int, animal string)
arrayOperations_unit_test.go:91
FunctionfindOneGuard
(i int)
arrayOperations_unit_test.go:60