Handbook
Glossary
clear-set ( set -- )
Factor handbook
»
The language
»
Collections
»
Sets
»
Operations on sets
Prev:
delete ( elt set -- )
Next:
union! ( set1 set2 -- set1 )
Vocabulary
sets
Inputs
set
a
set
Outputs
None
Generic word contract
Removes all entries from the set.
Side effects
Modifies
set
Definition
IN:
sets
GENERIC:
clear-set
( set -- )
Methods
USING:
kernel
sets
;
M:
f
clear-set
drop
;
inline
USING:
accessors
hash-sets
hashtables.private
kernel
sequences
sets
;
M:
hash-set
clear-set
[
init-hash
]
[
array>>
[
drop
+empty+
]
map!
drop
]
bi
;
USING:
accessors
assocs
deques
kernel
linked-sets
sets
;
M:
linked-set
clear-set
[
assoc>>
clear-assoc
]
[
dlist>>
clear-deque
]
bi
;
USING:
sequences
sets
;
M:
sequence
clear-set
delete-all
;
inline
USING:
kernel
sequences
sets
;
M:
set
clear-set
[
members
]
keep
[
delete
]
curry
each
;
USING:
accessors
hash-sets.wrapped
sets
;
M:
wrapped-hash-set
clear-set
underlying>>
clear-set
;
inline