diff ( set1 set2 -- set )
Factor handbook » The language » Collections » Sets » Operations on sets

Prev:null? ( set -- ? )
Next:intersect ( set1 set2 -- set )


Vocabulary
sets

Inputs
set1a set
set2a set


Outputs
seta set


Word description
Outputs a set consisting of elements present in set1 but not set2, comparing elements for equality.

This word has a default definition which works for all sets, but set implementations may override the default for efficiency.

Examples
USING: sets prettyprint ; { 1 2 3 } { 2 3 4 } diff .
{ 1 }


See also
intersect, union

Definition

GENERIC: diff ( set1 set2 -- set )


Methods