use meta-predicates.
This commit is contained in:
parent
c0b723ca14
commit
f2038e9e36
@ -149,9 +149,8 @@ flip_pairs([Key-Val|Pairs], [Val-Key|Flipped]) :-
|
|||||||
% map_list_to_pairs(length, ListOfLists, Pairs),
|
% map_list_to_pairs(length, ListOfLists, Pairs),
|
||||||
% ==
|
% ==
|
||||||
|
|
||||||
:- module_transparent
|
:- meta_predicate
|
||||||
map_list_to_pairs/3,
|
map_list_to_pairs(2,+,+).
|
||||||
map_list_to_pairs2/3.
|
|
||||||
|
|
||||||
map_list_to_pairs(Function, List, Pairs) :-
|
map_list_to_pairs(Function, List, Pairs) :-
|
||||||
map_list_to_pairs2(List, Function, Pairs).
|
map_list_to_pairs2(List, Function, Pairs).
|
||||||
|
Reference in New Issue
Block a user