

% give the first element of a list
% head([a,b,c], c).





% Give the last element of the list
% If the list has one item, return that item
% else call yourself on the tail
% tail([a,b,c], c).





% Be true if the item can be found in the list
% Be false otherwise.
% if its the head, say yes
% else cal yousrself on the tail
% search([a,b,c,d],c) -> true
% search([a,b,c,d],f) -> false




	
% Return the Nth item of a list
% if n == 0, return the head
% else call yourself with n-1 and the tail
% index([a,b,c,d],2,c).
% index([a,b,c,d],4,X) gives false.




% countof a given item
% if N is zero and the list is empty, say yes
% else if the head is the item, call youself on N-1 and the tail
% else call youself on N and the tail
% countof([a,b,c,a,a], a, 3) is true.
% countof([a,b,c,a,a], x, 0) is true.





