/**
* Creates an `ImmutableArray` of unique values, in order, from the given
* arrays using the specified `Equivalence` for equality comparisons.
*
* @tsplus static ImmutableArray.Aspects union
* @tsplus pipeable ImmutableArray union
*/
export function union(E: Equivalence, that: ImmutableArray) {
return (self: ImmutableArray): ImmutableArray =>
self.concat(that.filter((a) => !self.elem(E, a)))
}