Lambda calculus with C++ templates

Code is taken from matt.might.net almost literally