title: how to count odd and even number with using PROLOG
body: <p>question is:</p>
  
  <p>when we key in mem([1,2,3,4,5]).</p>
  
  <p>we will get the output as bellow:</p>
  
  <p>odd=3</p>
  
  <p>even=2</p>
  
  <p>my coding is like that but cannot run. can help me check where is my mistake??</p>
  
  <p>mem(X,[X|L]).</p>
  
  <p>mem(X,[element|L]):-
      mem([X,L]).</p>
  
  <p>count([],L,L).</p>
  
  <p>count([X|H],L1,L2):-
      write(even),
      X%2=0,nl,
      write(odd),
      X%2>=1,nl,
      count([H],[X|L1],L2).</p>
  
  <p>thanks for your helping.</p>