Function intersects
Source pub fn intersects<T: Eq + Hash>(a: &[T], b: &[T]) -> bool
Expand description
Returns true when a and b share at least one element.
§Arguments
a - The first slice.
b - The second slice.
§Examples
use helpers4::array::intersects;
assert!(intersects(&[1, 2, 3], &[3, 4]));
assert!(!intersects(&[1, 2], &[3, 4]));