Refactor untyped lambda