"The Y of Why" in newLISP

The task is to find a function Y, which can transform a recursive function into a function which is truly functional without side effects, no free variables and a fixed point property. The following is a version of Richard P. Gabriel's "The Why of Y" [1] modified for newLISP.

Find Y

This is the original recursive definition for factorial fact:

(define fact (lambda (n) (if (< n 2) 1 (* n (fact (- n 1))))))

The original factorial redefined as an anonymous function and taking the true factorial in h:

(lambda (h) (lambda (n) (if (< n 2) 1 (* n (h (- n 1))))))

If this function is called F and the true factorial is f then ((F f) n) = (F n), f is a fixed point of F.

We are looking for a function Y with the property: ((F (Y F)) x) = ((Y F) x)

This function is called the Applicative-order Y fixed point operator for functionals. To achieve this we transform the basic form of the factorial function:

Up to this point expressions are identical to those found in Richard P. Gabriel's "The Why of Y". The rest of the transformations follows Gabriel's, but inserts the newLISP function expand where required to achieve a closure effect for the function passed as a parameter into the (lambda (h) ...) expression.