Handbook
Glossary
?heap-pop-value>array ( heap -- array )
Vocabulary
sequences
.
extras
Inputs
heap
an
object
Outputs
array
an
array
Word description
Pushes the value at the top of
heap
as a single element array. Returns an empty array if the heap is empty.
Definition
USING:
arrays
heaps
kernel
;
IN:
sequences.extras
:
?heap-pop-value>array
( heap -- array )
dup
heap-empty?
[
drop
{
}
]
[
heap-pop
drop
1array
]
if
;