by shigemk2

当面は技術的なことしか書かない

scala pr 5132

github.com

scala 2.11.8だとこうなる

scala> import collection.mutable._
import collection.mutable._

scala> val q = new PriorityQueue[Int]()
q: scala.collection.mutable.PriorityQueue[Int] = PriorityQueue()

scala> q += 1 += 2 += 3
res0: q.type = PriorityQueue(3, 1, 2)

scala> val qq = q.reverse.reverse
qq: scala.collection.mutable.PriorityQueue[Int] = PriorityQueue(3, 1, 2)

scala> q.ord eq qq.ord
res1: Boolean = false // これをtrueに