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