Implicit parameter in Scalaz
- by Thomas Jung
I try to find out why the call Ø in scalaz.ListW.<^> works
def <^>[B: Zero](f: NonEmptyList[A] => B): B = value match {
case Nil => Ø
case h :: t => f(Scalaz.nel(h, t))
}
My minimal theory is:
trait X[T]{
def y : T
}
object X{
implicit object IntX extends X[Int]{
def y = 42
}
implicit object StringX…