diff options
author | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 18:24:58 +0000 |
---|---|---|
committer | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 18:24:58 +0000 |
commit | 5fe8b9865cfbd7388b8f6355a73b1436d40cfb1e (patch) | |
tree | c7ec08d8435881d103223d22672ad3d07b4d821a /stdlib.pl | |
parent | fd10cf6997473226272b397b0ff6ebd87bd4d161 (diff) |
Make predicates private and static by default, and make them dynamic when using the dynamic/1 predicate
Diffstat (limited to 'stdlib.pl')
-rw-r--r-- | stdlib.pl | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -358,6 +358,8 @@ is_list(T) :- list(T), ! ; type_error(list, T). is_integer(T) :- integer(T), ! ; type_error(integer, T). +is_predicate_indicator(T) :- (nonvar(T), T = N/A, integer(A), atom(N), !) ; type_error(predicate_indicator, T). + % All solutions findall(Template, Goal, Instances) :- @@ -372,7 +374,7 @@ findall(Template, Goal, Instances) :- findall_collect([], Instances). findall_collect(Acc, Instances) :- - retract('find all'(Item)), + system:retract('find all'(Item)), !, findall_collect(Item, Acc, Instances). findall_collect([], Instances, Instances). |