let iter (func: data -> unit) (heap: heap) : unit = for i = 0 to heap.hp_length - 1 do func heap.hp_heap.(i) done