Playlist | schedule page slides as PDF |
Y 1 — introduction (2:57)
Goal: use let and lambda to encode a recursive letrec expression.
Y 2 — self-application (1:58)
Our first step in understanding the letrec encoding is to implement the factorial function in Shplait without letrec.
Y 3 — isolate function body (2:26)
Our second step in understanding the letrec encoding is to separate the part of the factorial function’s implementation that is not specific to the factorial function.
Y 4 — parsing letrec
(1:18)
Our third and final step in understanding the letrec encoding is to identify the equivalent expression that parse can produce for an input letrec form.
Y 5 — Y combinator (1:39)
The key part of our encoding, mk-rec is a fixed-point combinator. The famous Y combinator is another.