Hello,
Not very clear what you tried and what you expected and what you got instead. Do you mean that you have a list of strings, like ["a", "b", "c"], and you want to get the string "abc"? As in:
?- atomics_to_string(["a", "b", "c"], X).
X = "abc".
And you tried:
?- L = ["a", "b", "c"], L = [H|T], foldl(string_concat, T, H, X).
L = ["a", "b", "c"],
H = "a",
T = ["b", "c"],
X = "cba".
... and this is throwing you off?
If this was the case, you can consider reversing the list first:
?- L = ["a", "b", "c"], reverse(L, [H|T]), foldl(string_concat, T, H, X).
L = ["a", "b", "c"],
H = "c",
T = ["b", "a"],
X = "abc".
You can also write your own foldr/4 (Right Fold) that either reverses and does a left fold or does something more fancy.
But again I am making too many assumptions about your intentions and your problem.