scala - Scalaz ValidationNel: traverse is not a member of List -
playing scalaz validationnel
, trying transform list[validationnel[string, mytype]]
validationnel[string, list[mytype]]
my code:
import scalaz._ import scalaz.syntax.traverse._ import scalaz.std.list._ import scalaz._ val ns: nodeseq = // ... val v: validationnel[string, list[mytype]] = ns.tolist.traverse[({ type l[x] = validationnel[string, x] })#l, mytype](extractmytype(_)) private def extractmytype(n: node): validationnel[string, mytype] = //...
when compiling sbt, get:
[error] myclass.scala:xx: value traverse not member of list[scala.xml.node]
[error] val v: validationnel[string, list[mytype]] = ns.tolist.traverse[({ type l[x] = validationnel[string, x] })#l, mytype](extractmytype(_))
i not traverseu
work either version work before going further.
i using scala 2.10.0 , scalaz 7.1.1
where mistake?
Comments
Post a Comment