是否可以将 maplist/3 与 'anonymous' 谓词一起使用?

is it possible to use maplist/3 with 'anonymous' predicate?

我希望用 maplist/3 实现的例如以下伪代码:

maplist(
   lambda X: Z/Y=X, to_lower(Z,LC), char_code(L,LC), return L/Y,
   ['A'/42, 'B'/500],
   Res).
Res = ['a'/42, 'b'/500]

我知道可以这样写例如

maplist(plus(1), [1,2,3,4], Res).
Res = [2,3,4,5].

所以我可以将伪代码 lambda X: Z/Y=X, to_lower(Z,LC), char_code(L,LC), return L/Y 定义为普通谓词并在映射列表中使用此谓词...

但是,我很好奇是否可以在不创建全新谓词的情况下做到这一点?

我之所以要这样做,是因为我觉得读起来更自然,而不是在代码中跳来跳去寻找谓词

library(lambda)

?- maplist(\ (Z/Y)^(L/Y)^ ( char_code(Z,ZC),
                            to_lower(ZC,LC),
                            char_code(L,LC) ), ['A'/42, 'B'/500], Res).
Res = [a/42, b/500].