Btw. I found 8 possibilities to concat atoms in Swi Prolog

When it comes to learning SWI-Prolog I don’t rely on the documentation much anymore. Since the documentation comes from doc comments in the source code and seeing examples of code from trusted source is better than reading about it, I just down load the trusted source code from places like GitHub and then use Notepad++ to find examples. Often when doing this some of the best examples are in the test cases.

This list shows many of the GitHub repositories I search regularly on my local copies. However if I can not find a good example I will search GitHub directly and if I find an example not in my local copies will pull that down for future searching. It is amazing some of the things others do with Prolog.

Also I don’t search just the Prolog code, often the C code and C structures give some very inciteful information.
See: A taste of Doxygen used to diagram the SWI-Prolog C structures relations

HTH