I use :
say(Lst) :- is_list(Lst), writeln(Lst). say(S) :- say(S,[]). say(S,P) :- string_concat(S, '~n', S1), format(S1,P). ?- say('hello'). hello true. ?- say('hello ~w',[world]). hello world true. ?- say('hello ~w ~w',[new,world]). hello new world true.