Skip to content

Commit 035461b

Browse files
author
Luka Jacobowitz
committed
Remove optimized combineAll
1 parent fef41c1 commit 035461b

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

core/src/main/scala/cats/instances/sortedMap.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import cats.kernel.instances.StaticMethods
66

77
import scala.annotation.tailrec
88
import scala.collection.immutable.SortedMap
9-
import scala.collection.mutable
109

1110
trait SortedMapInstances extends SortedMapInstances1 {
1211

@@ -159,15 +158,4 @@ class SortedMapMonoid[K, V](implicit V: Semigroup[V], O: Order[K]) extends Monoi
159158
}
160159
}
161160

162-
override def combineAll(xss: TraversableOnce[SortedMap[K, V]]): SortedMap[K, V] = {
163-
val acc = mutable.SortedMap.empty[K, V](O.toOrdering)
164-
xss.foreach { m =>
165-
val it = m.iterator
166-
while (it.hasNext) {
167-
val (k, v) = it.next
168-
acc(k) = Semigroup.maybeCombine(acc.get(k), v)
169-
}
170-
}
171-
SortedMap.empty[K, V](O.toOrdering) ++ acc
172-
}
173161
}

0 commit comments

Comments
 (0)