add meta_predicate/1 declarations

This commit is contained in:
Markus Triska
2022-07-25 00:10:32 +02:00
committed by Mark Thom
parent 1ff52f70aa
commit 4422ffe39f

View File

@@ -194,6 +194,8 @@ type_error(Expectation, Term) :-
type_error(Expectation, Term, unknown(Term)-1). type_error(Expectation, Term, unknown(Term)-1).
:- meta_predicate(partition(1, ?, ?, ?)).
partition(Pred, Ls0, As, Bs) :- partition(Pred, Ls0, As, Bs) :-
include(Pred, Ls0, As), include(Pred, Ls0, As),
exclude(Pred, Ls0, Bs). exclude(Pred, Ls0, Bs).
@@ -214,6 +216,8 @@ partition_([X|Xs], Pred, Ls0, Es0, Gs0) :-
include/3 and exclude/3 include/3 and exclude/3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
:- meta_predicate(include(1, ?, ?)).
include(Goal, Ls0, Ls) :- include(Goal, Ls0, Ls) :-
include_(Ls0, Goal, Ls). include_(Ls0, Goal, Ls).
@@ -226,6 +230,7 @@ include_([L|Ls0], Goal, Ls) :-
include_(Ls0, Goal, Rest). include_(Ls0, Goal, Rest).
:- meta_predicate(exclude(1, ?, ?)).
exclude(Goal, Ls0, Ls) :- exclude(Goal, Ls0, Ls) :-
exclude_(Ls0, Goal, Ls). exclude_(Ls0, Goal, Ls).