domains
x = integer
l = integer*
predicates
concatenate(l,l,l)
evenlength(l)
oddlength(l)
clauses
concatenate([],L,L).
concatenate([X|L1],L2,[X|L3]) :-
concatenate(L1,L2,L3).
evenlength([]).
evenlength(L) :-
concatenate(L1,[X1,X2|L2],L),
evenlength(L2).
oddlength([X]).
oddlength(L) :-
concatenate(L1,L2,L),
oddlength(L1);
oddlength(L2).