Handbook
Glossary
clear-deque ( deque -- )
Factor handbook
»
The language
»
Collections
»
Deques
Prev:
pop-back* ( deque -- )
Next:
delete-node ( node deque -- )
Vocabulary
deques
Inputs
deque
a
deque
Outputs
None
Word description
Removes all elements from a deque.
Definition
IN:
deques
GENERIC:
clear-deque
( deque -- )
Methods
USING:
accessors
deques
dlists
kernel
;
M:
dlist
clear-deque
f
>>front
f
>>back
drop
;
USING:
accessors
assocs
deques
kernel
search-deques
;
M:
search-deque
clear-deque
[
deque>>
clear-deque
]
[
assoc>>
clear-assoc
]
bi
;
USING:
accessors
deques
kernel
unrolled-lists
;
M:
unrolled-list
clear-deque
f
>>front
0
>>front-pos
f
>>back
unroll-factor
>>back-pos
drop
;