Tests for when/2 and solved bug

This commit is contained in:
bakaq
2023-12-11 12:28:59 -03:00
parent 6a30ccc907
commit f411fb1eb3
5 changed files with 151 additions and 1 deletions

View File

@@ -9,6 +9,9 @@ Provides the predicate `when/2`.
:- use_module(library(lists)).
:- use_module(library(lambda)).
:- use_module(library(format)).
:- use_module(library(debug)).
:- attribute when_list/1.
:- meta_predicate(when(+, 0)).
@@ -51,7 +54,7 @@ remove_goal([G0|G0s], Goal, Goals) :-
( G0 == Goal ->
remove_goal(G0s, Goal, Goals)
; Goals = [G0|Goals1],
remove_goal(G0, Goal, Goals1)
remove_goal(G0s, Goal, Goals1)
).
vars_remove_goal(Vars, Goal) :-