differenceOf

Returns a new array containing all elements in setA which are not present in setB and the elements in setB which are not present in setA. Both setA and setB are required to be sorted. Comparisons will be performed using the supplied predicate or '<' if none is supplied.

T[]
differenceOf
()
(
in T[] setA
,
in T[] setB
,
Pred pred = Pred.init
)

Parameters

setA T[]

The first sorted array to evaluate.

setB T[]

The second sorted array to evaluate.

pred Pred

The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type.

Return Value

Type: T[]

A new array containing the elements in setA that are not in setB and the elements in setB that are not in setA.

Meta