Handbook
Glossary
assoc>pheap ( assoc -- heap )
Persistent heaps
Prev:
pheap-empty? ( heap -- ? )
Next:
pheap>alist ( heap -- alist )
Vocabulary
persistent
.
heaps
Inputs
assoc
an
assoc
Outputs
heap
a persistent heap
Word description
Creates a new persistent heap from an associative mapping whose keys are the entries in the heap and whose values are the associated priorities.
Definition
USING:
assocs
kernel
;
IN:
persistent.heaps
:
assoc>pheap
( assoc -- heap )
<persistent-heap>
swap
[
rot
pheap-push
]
assoc-each
;