Prolog odd / even length list function

Prolog reverse list function


Prolog function – add member element to list

Prolog concate function

Prolog variables

Any word beginning with an upper-case letter is a Prolog variable, which is why I had to be careful to use lower-case initial letters in my earlier examples.

A variable isn’t a name, rather it’s a placeholder for information. Query essentially asks Prolog: tell me which of the individuals you know about is a […]