case class Special(foo: Bar) {
}
case class SpecialMap(bar: Map[SpecialKey, Special]) {
//I want to be able to do
def combineValuesMap(that: SpecialMap) : SpecialMap = {
this.bar |+| that.bar
}
}
I have tried overloading + in special however that did not enable me to perform. How can I create a special type that will allow me to utilize the semigroup to do this?
Reference for |+| : Best way to merge two maps and sum the values of same key?