我正在尝试定义这种同时使用 shapeless 和 Scalaz 的方法,但是它从 scalaz 中为地图拾取隐式,而不是某些东西(也许是“隐式宏”?我什至不知道那是什么) ) 从无形:
import scalaz._
import Scalaz._
import Category._
import shapeless.{Lens => _, _}
import poly._
import syntax.std.tuple._
import language.{higherKinds,implicitConversions}
/** Partitions an object which is isomorphic to a Seq, into two objects of the same type. */
def partitionIso[A,B](p: B => Boolean)(a: A)(implicit iso: A <=> Seq[B]): (A, A) =
iso.to(a).partition(p).map(iso.from(_))
日食 说:
Multiple markers at this line
- Implicit arguments found: =>
( scalaz.Functor.Tuple2Functor )
- type mismatch; found : (Seq[B], A) required: (A, A)
- Implicit conversions found: => Tuple2MA()
如何更改此代码以使其编译?