Handbook
Glossary
diff! ( set1 set2 -- set1 )
Factor handbook
»
The language
»
Collections
»
Sets
»
Operations on sets
Prev:
union! ( set1 set2 -- set1 )
Next:
intersect! ( set1 set2 -- set1 )
Vocabulary
sets
Inputs
set1
a
set
set2
a
set
Outputs
set1
a
set
Word description
Removes all members from
set1
contained in
set2
.
Side effects
Modifies
set1
Definition
USING:
kernel
sequences
sets.private
;
IN:
sets
:
diff!
( set1 set2 -- set1 )
dupd
sequence/tester
pick
[
delete
]
curry
[
[
[
dup
]
]
dip
compose
]
dip
[
[
drop
]
if
]
curry
compose
each
;