Slide 12
Slide 12 text
Ep 3: Adding Numbers
But how?
Is there an implicit value of type +[_2, _3]?
show(+[_2, _3])
implicit def basic[A <: Nat]: Add[_0, A, A] = new +[_0, A] {
type Result = A
}
implicit def inductive[A <: Nat, B <: Nat](implicit evidence: +[A, B]): Add[Succ[A], B, Succ[evidence.Result]] =
new +[A, B] {
type Out = Succ[evidence.Result]
}
No, but _2 = Succ[_1], so maybe I can look further