p :- p.
p.

isPeano(s(X)) :- isPeano(X).
isPeano(o).

% last element of a list
last([H|T], E) :- last(T,E).
last([E], E).

