pos(A,[H|T],N):-
	M is N-1, !,
	M = 0,
	A = H;
	pos(A,T,M).

occ(A,L,N):- conta(A,L,N).

occ(A,L,N) :-
	not(var(N)), var(A),
	pos(A,L,N).

occ(A,L,N) :-
	var(A), var(N),
	conta(A,L,N),
	pos(A,L,N).
