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).
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)),
Max = 1, List =  ;
Max = 2, List = [1, 2] ;
Max = 3, List = [1, 2, 3].
- See also