We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0de94f commit a799fa5Copy full SHA for a799fa5
src/slices/slices.go
@@ -15,6 +15,7 @@ import (
15
// elements equal. If the lengths are different, Equal returns false.
16
// Otherwise, the elements are compared in increasing index order, and the
17
// comparison stops at the first unequal pair.
18
+// Empty and nil slices are considered equal.
19
// Floating point NaNs are not considered equal.
20
func Equal[S ~[]E, E comparable](s1, s2 S) bool {
21
if len(s1) != len(s2) {
0 commit comments