Implement compilation of lambdas