Type Inference by Example, Part 5

Continuing where we left off in part 4, let’s finish implementing a first version of the type inference — and see a small demo.
The first thing we’ll need is a language to infer types for. Let’s start with the lambda calculus:
sealed abstract class Expression
case class ELambda(x : String, e : Expression) extends Expression
case class EApply(e1 : Expression, e2 : Expression)…