Handbook
Glossary
slurp-heap ( ... heap quot: ( ... value key -- ... ) -- ... )
Factor handbook
»
The language
»
Collections
»
Heaps
Prev:
heap-delete ( entry heap -- )
Vocabulary
heaps
Inputs
heap
a
heap
quot
a
quotation
with stack effect
( ... value key -- ... )
Outputs
None
Word description
Removes entries from a heap and processes them with the quotation until the heap is empty.
Definition
USING:
kernel
;
IN:
heaps
:
slurp-heap
( ... heap quot: ( ... value key -- ... ) -- ... )
[
drop
[
heap-empty?
]
curry
]
[
[
[
heap-pop
]
curry
]
dip
compose
until
]
2bi
;
inline