ForEach
forEach(?Element, +List, +Goal): Goal (all its solutions) for each element of List, as findall(_, (member(Element, List), Goal), _), but without List in the goals of the iterations: with variable tracking, every resolution step visits the terms of the goal it belongs to, so the list would make every step as costly as it is long. Goal runs in this module: other modules are called through ::.