def foo(a: Map[String, Int], b: HashMap[String, Int]) {
// okay
val ab = a |+| b
// value |+| is not a member of scala.collection.immutable.HashMap[String,Int]
val ba = b |+| a
}
HashMaps は Semigroups ではなく、Maps はなぜですか? オブジェクト指向のバックグラウンドを持つ私は、HashMap が Map と同じくらい有能だと思っていたでしょうか?