3 ms·
> You seem to be quite keen on the notion of lambda lifting a function "in place", so maybe you can explain why one would want to do that. Have a look at lots
by nils-m-holm 8y ago
> You seem to be quite keen on the notion of lambda lifting a function "in place", so maybe you can explain why one would want to do that.
Have a look at lots of expanded LISP macros, there are nested lambdas all over the place, most of them applied in situ. Converting those applications as described above avoids the cost of closure creation and all that is left is a function call or, in case of tail application, a jump. It is a rather essential optimization in LISP.
Also: in situ application is useful for illustrating the principle. I have described the more general case somewhere else in this discussion.