What does [a|b|c] evaluate to in Prolog?
- by Ambrose
The pipe operator in prolog returns one or more atomic Heads and a Tail list.
?- [a,b,c] = [a,b|[c]].
true.
Nesting multiple pipes in a single match can be done similar to this:
?- [a,b,c] = [a|[b|[c]]].
true.
What does the statement [a|b|c] infer about a, b and c?