Back to Lo

Core Elementsmatch

docs/data/core-elementsmatch.md

1.53.0224 B
Original Source

Returns true if lists contain the same set of elements (including empty set). If there are duplicate elements, occurrences must match. Order is not checked.

go
lo.ElementsMatch([]int{1, 1, 2}, []int{2, 1, 1})
// true