scalaz7

Why is List a Semigroup but Seq is not?

假如想象 提交于 2019-11-26 20:23:35
问题 I'm fairly new to scalaz and I am trying to figure out why the following code works: import scalaz._ import Scalaz._ scala> Map[String,List[String]]() |+| Map[String,List[String]]() res3: scala.collection.immutable.Map[String,List[String]] = Map() but this doesn't... import scalaz._ import Scalaz._ scala> Map[String,Seq[String]]() |+| Map[String,Seq[String]]() <console>:14: error: value |+| is not a member of scala.collection.immutable.Map[String,Seq[String]] Map[String,Seq[String]]() |+| Map