An immutable Heap (priority queue) implementation in Scala