Well done!

I wrote a wee lambda calculus interpreter to test out the book forms. I did cheat a wee bit and added:

def <name> = <exp> ==> substitution of <exp> for <name> before evaluation

if <exp1> then <exp2> else <exp3> fi ==> ((<exp1> <exp2>) <exp3>)

to make things more readable.

I think a few folk have got as far as implementing lists and recursion, but you're the first dynamic type implementer I've come across.

I think lambda calculus is fun. My book is about functional programming, and so isn't much use for theory, for which I recommend Barendregdt's "The Lambda Calculus. Its Syntax and Semantics".

Best wishes

Greg Michaelson