slurp-deque-when ( deque quot1: ( value -- ) quot2: ( value -- ) -- )


Vocabulary
spider.unique-deque

Inputs
dequean object
quot1a quotation with stack effect ( value -- )
quot2a quotation with stack effect ( value -- )


Outputs
None

Definition


:: 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