% predicate which maps a binary predicate over two lists:
map_list(_,[],[]).
map_list(P,[X|Xs],[Y|Ys]) :- call(P,X,Y), map_list(P,Xs,Ys).

% predefined as maplist in SWI and SICStus (in library lists).
