/**
* Creates an array of unique values that are included in all given arrays using
* an `Equivalence` for equality comparisons. The order and references of
* result values are determined by the first array.
*
* @tsplus static Chunk.Aspects intersection
* @tsplus pipeable Chunk intersection
*/
export function intersection(E: Equivalence, that: Chunk) {
return (self: Chunk): Chunk => self.filter((a) => that.elem(E, a))
}