?- foreach(member(X, [red,green,blue,black,white]), writeln(X)). red green blue black white true.