The Wikipedia article for Prolog states:
Higher-order programming style in Prolog was pioneered in HiLog and λProlog.
The motivation for HiLog includes its ability to implement higher-order predicates like maplist
:
maplist(F)([],[]).
maplist(F)([X|Xs],[Y|Ys]) <- F(X,Y), maplist(F)(Xs,Ys).
The paper that describes HiLog assumes that Prolog only has call/1
, not call/3
.
However, since Prolog (now) has call/3
, maplist
can be easily implemented in it:
maplist(_, [], []).
maplist(P, [X|Xs], [Y|Ys]) :- call(P, X, Y), maplist(P, Xs, Ys).
Is HiLog mostly of historical interest, or is its "higher-order" logic more general that what's available in Prolog now?