Simple question, I have looked at this one already: Managing imports in Scalaz7, but I can't figure out how to minimally inject the right
and left
methods into my objects to construct instances of \/
.
I did try:
import syntax.ToDataOps
and other variations of To...
such as syntax.ToIdOps
as suggested in http://eed3si9n.com/learning-scalaz-day13.
Simple example:
import scalaz.{\/, syntax}
import // What goes here
class Test {
def returnEitherT(h: Int): String \/ Int = {
h right
}
}
Thanks, Jason.
===========
I solved it by using import syntax.id._
but I'm unsure why this worked.