Availability:
:- use_module(library(dcg/high_order)).
//
//
?- phrase(foreach(between(1,5,X), number(X), ", "), L). L = "1, 2, 3, 4, 5".
:- use_module(library(dcg/high_order)).
//
//
?- phrase(foreach(between(1,5,X), number(X), ", "), L). L = "1, 2, 3, 4, 5".