Basically, there are two approaches for lambda expressions in Prolog that address only calling lambda expressions and not higher-level unification:
globally by default: Variables in the body of a lambda expression by default are globally if they are not mentioned using an additional binder.
local-by-default: Variables in the body of a lambda expression by default are local unless they are mentioned by an additional binder.
Representatives of local defaults are, for example, Ulrich Neumerkel's libraries (lambda) or lambda expressions found in Logtalk. Currently, the lambda expressions found in Jekejeke Prolog are applied according to the "global default" principle.
Both approaches allow you to simulate the same mathematical lambda of expressions and solve the following problems:
Here is an example factorial through Y combinator:
? - Y = F \ X ^ call (X \ call (F, call (X, X)), X \ call (F, call (X, X))),
Fact = F \ J ^ H ^ M ^ N ^ N \ J ^ H ^ M ^ M \ J ^ H ^ (N = 0, M = 1; N> 0, H is N-1, call (F, H , J), M is N * J),
call (Y, Fact, 10, R).
R = 3628800.
? - Y = \ F ^ call ([F] + \ X ^ call (F, call (X, X)), [F] + \ X ^ call (F, call (X, X))),
Fact = \ F ^ ([F] + \ N ^ ([N, F] + \ M ^ (N = 0, M = 1; N> 0, H is N-1, call (F, H, J) , M is N * J))),
call (Y, Fact, 10, R).
R = 3628800.
Bye
PS: The distinction between global defaults and local defaults is taken from, p. 10:
Language Features and B-Prolog Architecture
Neng-fa Zhou, Theory and Practice of Logical Programming, 2011
http://www.sci.brooklyn.cuny.edu/~zhou/papers/tplp11sips.pdf