7

Possible Duplicate:
What are type lambdas in Scala and what are their benefits?

  1. How to resolve this type definition: Pure[({type ?[a]=(R, a)})#?] ?

  2. What are the reasons of using such construction?

Snipped comes from scalaz library:

trait Pure[P[_]] {
  def pure[A](a: => A): P[A]
}

object Pure {
  import Scalaz._
//...
  implicit def Tuple2Pure[R: Zero]: Pure[({type ?[a]=(R, a)})#?] = new Pure[({type ?[a]=(R, a)})#?] {
  def pure[A](a: => A) = (Ø, a)
  }

//...
}
Community
  • 1
  • 1
pawel.panasewicz
  • 1,831
  • 16
  • 27

0 Answers0