Reputation: 1085
I'm learning Scalaz recently. I would like to know how λ[α =>F] works?
scala> Applicative[λ[α => Int]].point(10)
res45: Int = 0
scala> Applicative[λ[α => String]].point(10)
res46: String = ""
I can understand λ means some type here, but I could not find its definition and would like to know how the above code works.
Upvotes: 3
Views: 238
Reputation: 3118
scalaz use kind-projector.
Applicative[λ[α => Int]]
is equivalent to Applicative[({type l[a] = Int})#l]
Upvotes: 2