desugar defFunc to defVar of lambda, and remove dead code
desugar defFunc to defVar of lambda, and remove dead code