How to compile to Lambda calculus