Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 525 Bytes

type_lambda.adoc

File metadata and controls

12 lines (9 loc) · 525 Bytes

Type Lambda

In type lambda’s we’ll be using Path Dependent as well as Structural Types, so if you skipped those sections you may need to go back to either of them.

Before we look at Type Lambdas, let’s take a step back and remind ourselves a bit about functions and currying.

class EitherMonad[A] extends Monad[({type λ[α] = Either[A, α]})#λ] {
  def point[B](b: B): Either[A, B]
  def bind[B, C](m: Either[A, B])(f: B => Either[A, C]): Either[A, C]
}