PriorityQueue<T>.from constructor
Creates a PriorityQueue containing the elements of the given iterable.
The elements are built into a heap queue.
Implementation
PriorityQueue.from(Iterable<T> elements, [int Function(T, T)? compare])
: _compare = compare ?? _defaultCompare {
for (final element in elements) {
push(element);
}
}