public function sortHeap(SplHeap $heap) { foreach ($this as $item) { $heap->insert($item); } return static::fromItems($heap); }