Generate a list from the solutions of Generator. This
predicate collects all solutions of Generator, applies Element
for each solution and Sep between each pair of
solutions. For example:
?- phrase(foreach(between(1,5,X), number(X), ", "), L).
L = "1, 2, 3, 4, 5".