Added a `slice` method to PriorityQueue