Handbook
Glossary
slurp-deque-when ( deque quot1: ( value -- ) quot2: ( value -- ) -- )
Vocabulary
spider
.
unique-deque
Inputs
deque
an
object
quot1
a
quotation
with stack effect
( value -- )
quot2
a
quotation
with stack effect
( value -- )
Outputs
None
Definition
USING:
deques
kernel
;
IN:
spider.unique-deque
::
slurp-deque-when
( deque quot1: ( value -- ) quot2: ( value -- ) -- )
deque
deque-empty?
[
deque
pop-front
dup
quot1
call
[
quot2
call
t
]
[
drop
f
]
if
[
deque quot1 quot2
slurp-deque-when
]
when
]
unless
;
inline
recursive