Examples
See Python's docs:
Changes w.r.t. Python's API
import {heapify, heappop} from '@data-structure/heapq';
import {increasing} from '@total-order/primitive';
let array = [2, 1, 3];
let heap = heapify(increasing, array);
array[0] ; // 1
heappop( heap ) ; // 1
heappop( heap ) ; // 2
heappop( heap ) ; // 3
array.length ; // 0