Refactoring of lambda evaluation