(a []T, b []T, equal func(a, b T) bool)
| 159 | } |
| 160 | |
| 161 | func OverlapCompare[T any](a []T, b []T, equal func(a, b T) bool) bool { |
| 162 | // For each element in b, if at least 1 is contained in 'a', |
| 163 | // return true. |
| 164 | for _, element := range b { |
| 165 | if ContainsCompare(a, element, equal) { |
| 166 | return true |
| 167 | } |
| 168 | } |
| 169 | return false |
| 170 | } |
| 171 | |
| 172 | // New is a convenience method for creating []T. |
| 173 | func New[T any](items ...T) []T { |
no test coverage detected