From: Markus Triska Date: Fri, 8 Sep 2023 20:41:49 +0000 (+0200) Subject: add meta_predicate/1 declaration for include/3 and exclude/3 X-Git-Tag: remove~104^2~4 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=ad4c17fbb6590b7bd04cd058e0d5d755d5dc14c3;p=scryer-prolog.git add meta_predicate/1 declaration for include/3 and exclude/3 --- diff --git a/src/lib/clpb.pl b/src/lib/clpb.pl index 311d6115..b5deff81 100644 --- a/src/lib/clpb.pl +++ b/src/lib/clpb.pl @@ -1949,6 +1949,8 @@ Compatibility predicates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ +:- meta_predicate(include(1, ?, ?)). + include(_, [], []). include(Goal, [L|Ls0], Ls) :- ( call(Goal, L) -> @@ -1957,6 +1959,8 @@ include(Goal, [L|Ls0], Ls) :- ), include(Goal, Ls0, Rest). +:- meta_predicate(exclude(1, ?, ?)). + exclude(_, [], []). exclude(Goal, [L|Ls0], Ls) :- ( call(Goal, L) ->