scala_parallelism_concurrency/src/main/scala/barneshut/conctrees/package.scala
2020-03-09 02:19:24 +01:00

17 lines
439 B
Scala

package barneshut
import org.scalameter._
package object conctrees {
implicit class ConcOps[T](val self: Conc[T]) extends AnyVal {
def foreach[U](f: T => U) = Conc.traverse(self, f)
def <>(that: Conc[T]) = Conc.concatTop(self.normalized, that.normalized)
}
// Workaround Dotty's handling of the existential type KeyValue
implicit def keyValueCoerce[T](kv: (Key[T], T)): KeyValue = {
kv.asInstanceOf[KeyValue]
}
}