17 lines
439 B
Scala
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]
|
|
}
|
|
}
|