Go Paradigm - MapReduce
Introduction
Map
1 | func MapStrToStr(arr []string, fn func(s string) string) []string { |
Reduce
1 | func Reduce(arr []string, fn func(s string) int) int { |
Filter
1 | func Filter(arr []int, fn func(n int) bool) []int { |
Generic
1 | func GenericMap[T, U any](arr []T, fn func(T) U) []U { |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.