```[[Documentation]]

*Examples

**Append

append(c(1,c(2,c(3,n))),c(4,c(5,n)),result).
append(X,Y,Z), n(X)      :- Y=Z.
append(X,Y,Z), c(A,X1,X) :- c(A,Z1,Z), append(X1,Y,Z1).

result = append([1,2,3],[4,5]).
Z=append([],    Y) :- Z=Y.
Z=append([A|X1],Y) :- Z=[A|append(X1,Y)].

**Self-Organizing Loop
a(free,free),a(free,free),a(free,free),a(free,free),a(free,free),
a(free,free),a(free,free),a(free,free),a(free,free),a(free,free),
a(free,free),a(free,free),a(free,free),a(free,free),a(free,free),
a(free,free),a(free,free),a(free,free),a(free,free),a(free,free),
a(free,free),a(free,free),a(free,free),a(free,free).
free(A),free(B),a(A,C),a(D,B):-a(X,C),a(D,X).

**Vending Machine
{customer,a,one,one,five,hunger,hunger}.
{customer,b,five,hunger}.
{vending,choco,choco,choco,one,one}.
{customer,\$c,hunger,five},  {vending,\$v,choco,one,one}
:- {customer,\$c,choco,one,one},{vending,\$v,five}.
{customer,\$c,hunger,one,one,one},{vending,\$v,choco}
:- {customer,\$c,choco},             {vending,\$v,one,one,one}.

Two customers with different amounts of coins and hunger
are buying some chocolates.
Each chocolate costs three and
there are only two kinds of coins: one and five.

Run in shuffle mode (type shuffle).