Small utility library for performing common operations on slices in golang.
I don't promise that these are optimized (not even close!), but they work :)
var a = []int{1, 1, 2, 3}
var b = []int{2, 4}
diff := Difference[int](a, b)
// []int{1, 3}
fmt.Println(diff)
FindOneT any (T, bool)
ReduceT, A any A
FilterT any []T
MapT any []T
DistinctT comparable []T
IntersectT comparable []T
UnionT comparable []T
DifferenceT comparable []T
Docs are available, here
MIT
$ claude mcp add arrayOperations \
-- python -m otcore.mcp_server <graph>