?- atomic_list_concat([gnu, gnat], ', ', A). A = 'gnu, gnat'
The SWI-Prolog version of this predicate can also be used to split atoms by instantiating Separator and Atom as shown below. We kept this functionality to simplify porting old SWI-Prolog code where this predicate was called concat_atom/3.
?- atomic_list_concat(L, -, 'gnu-gnat'). L = [gnu, gnat]
Tag confusing pages with doc-needs-help|Tags are associated to your profile if you are logged in