impar(N):- R is N mod 2, R == 1.
par(N):- R is N mod 2, R == 0.

filtrar( _ , [] , [] ).

filtrar(Pred, [Cabeza | Cola], [Cabeza | Cola1]):- 
   call(Pred, Cabeza),
   filtrar(Pred, Cola, Cola1). 

filtrar(Pred, [Cabeza | Cola], Cola1):-   
   not(call(Pred, Cabeza)),   
   filtrar(Pred, Cola, Cola1).
