use meta-predicates.

This commit is contained in:
Vítor Santos Costa 2014-10-12 11:01:30 +01:00
parent c0b723ca14
commit f2038e9e36

View File

@ -149,9 +149,8 @@ flip_pairs([Key-Val|Pairs], [Val-Key|Flipped]) :-
% map_list_to_pairs(length, ListOfLists, Pairs),
% ==
:- module_transparent
map_list_to_pairs/3,
map_list_to_pairs2/3.
:- meta_predicate
map_list_to_pairs(2,+,+).
map_list_to_pairs(Function, List, Pairs) :-
map_list_to_pairs2(List, Function, Pairs).