import cats._
import cats.data._
import cats.implicits._
import cats.instances.all._
...
def test = Foldable[List].intercalate(List("a", "b", "c"), "-")
...
Ergebnisse in:Wie verwende ich Katzen Typklassen?
could not find implicit value for parameter instance: cats.Foldable[List]
Warum ist es nicht funktioniert und wie man es beheben? Es scheint, als ob es nur eine Kopie von ihrem docs ist:
scala> import cats.implicits._
scala> Foldable[List].intercalate(List("a","b","c"), "-")
res0: String = a-b-c
Edit 1:
Auch nach import cats.instances.all._
entfernen, wie es vorgeschlagen immer noch nicht funktioniert. Jetzt stürzt es mit:
value intercalate is not a member of cats.Foldable[List]
Welche Version von Katzen verwenden Sie? –
@YuvalItzchakov 0.7.2 – monnef