NAME

without - return elements of an array not present in another

SYNOPSIS

arr1.without(arr2)

DESCRIPTION

The without() method returns a vector containing all elements from arr1 that are NOT present in arr2. This is similar to APL arr1 ~ arr2.

RETURN VALUE

A vector containing the elements from arr1 that are not present in arr2.

ERRORS

ArgCheck if exactly one argument is not provided.

EXAMPLE

    a = [1, 2, 3, 4, 5]
    b = [2, 4]
    a.without(b)
1 3 5

SEE ALSO

unique
union
intersect