https://github.com/tofgarion/spark-by-example/blob/2e4eb5a56e85c804dc48d58ea5ebb3fd46364c69/heap/pop_heap_p_wo_lines.adb#L63 Further half finished implementation