while reading the documentations and testing examples of SWI PROLOG implementation I began to go deeper into lists. PROLOG lists are no different from most languages: it has a Head and a Tail.
I then learned that SWI PROLOG lists can be expressed like this:
[ Head | Tail ]
The syntax is pretty simple, square brackets with a head and a tail, separated by a vertical slash |
.
Then I started wondering: what is the meaning (the semantics) of the vertical slash |
in PROLOG?
I know that the vertical slash is indeed a special character, but why does it necessarily have to be a vertical slash? Is it an operator? Is it used for system or language (meta) applications? What is its specific function in the language?