declare meta-predicate call arguments (Paulo Moura).

This commit is contained in:
Vitor Santos Costa
2010-04-22 20:45:57 +01:00
parent 49c783cc10
commit 3cb5e57833
6 changed files with 89 additions and 79 deletions

View File

@@ -61,7 +61,9 @@ form colour(Left, Key, Value, Right), where _colour_ is one of =red= or
@author Vitor Santos Costa, Jan Wielemaker
*/
:- meta_predicate rb_map(+,:,-), rb_partial_map(+,+,:,-), rb_apply(+,+,:,-).
:- meta_predicate rb_map(+,2,-),
rb_partial_map(+,+,2,-),
rb_apply(+,+,2,-).
/*
:- use_module(library(type_check)).
@@ -773,8 +775,7 @@ visit(black(L,K,V,R),L0,Lf) :-
visit(L,[K-V|L1],Lf),
visit(R,L0,L1).
:- meta_predicate rb_map(?,:,?). % this is not strictly required
:- meta_predicate map(?,:,?,?). % this is required.
:- meta_predicate map(?,2,?,?). % this is required.
%% rb_map(+T, :Goal) is semidet.
%
@@ -794,8 +795,8 @@ map(black(L,K,V,R),Goal,black(NL,K,NV,NR),Nil) :-
map(L,Goal,NL,Nil),
map(R,Goal,NR,Nil).
:- meta_predicate rb_map(?,:). % this is not strictly required
:- meta_predicate map(?,:). % this is required.
:- meta_predicate rb_map(?,1). % this is not strictly required
:- meta_predicate map(?,1). % this is required.
%% rb_map(+T, :G, -TN) is semidet.
%