Heap
Heap
A simple, generic heap implementation that uses a caller provided function to enable heaps of custom types.
The basic heap types, min-heap and max-heap, can be implemented by using a simple lambda such as:
// min heap
{ a, b -> a < b }
// max heap
{ a, b -> a b }Content copied to clipboard
Author
Elizabeth Paige Harper - https://github.com/foxcapades
Since
0.1.0
Parameters
T
Type of values contained in this heap.
Constructors
Functions
Link copied to clipboard
Destructively iterates over the elements popped from this heap and calls the given function on each value.
Link copied to clipboard
Tests whether this heap contains one or more items.
Link copied to clipboard