erlang implementation of a lamda compiler