Back to Lo

Core Crossjoinx

docs/data/core-crossjoinx.md

1.53.0241 B
Original Source

Computes the cartesian product of input slices, returning tuples of all combinations. Variants support 2 up to 9 input slices.

Variants: CrossJoin2..CrossJoin9

go
a := []int{1,2}
b := []string{"x","y"}
pairs := lo.CrossJoin2(a, b)