True when List contains all instances of Template
that have been sent using send_signal/1
where the argument unifies with Ball. Note that backtracking
in Goal resets the List. For example, given
enum(I, Max) :- I =< Max, !, send_signal(emit(I)),
I2 is I+1, enum(I2, Max).
enum(_, _).
Consider the following queries
?- intercept_all(I, enum(1,6), emit(I), List).
List = [1, 2, 3, 4, 5, 6].
?- intercept_all(I, (between(1,3,Max),enum(1,Max)),
emit(I), List).
Max = 1, List = [1] ;
Max = 2, List = [1, 2] ;
Max = 3, List = [1, 2, 3].
- See also
- nb_intercept_all/4