% map function as a predicate
map_list(_,[],[]).
map_list(P,[X|Xs],[Y|Ys]) :- call(P,X,Y), map_list(P,Xs,Ys).

% predefined as "maplist" in SWI (and in SICStus in library lists)
% with arbitrary number of list arguments
