Removes all of the elements of @a not present in @b. This is the set intersection operation on @a and @b.
@a - the first array.
@b - the second array.
Scalar identity is used to determine scalar equivalence for this function. the identity algorithm compares references for object scalars and function scalars. The string representation is used to compare other scalars.
The array @a
@a = @("z", "b", "c", "d", "e"); @b = @("a", "b", "c"); retainAll(@a, @b); println("@a = " . @a); println("@b = " . @b);
@a = @('b', 'c') @b = @('a', 'b', 'c')