title: Prolog - check if list is empty []
body: <p>I am just trying to figure out how to check if a list is empty, I put together something that checks the length of the list, and additionally should check to see if the list isn't empty.</p>
  
  <pre><code>% Gives the length of a list.
  listlength([]     , 0 ).
  listlength([_|Xs] , L ):- 
      listlength(Xs,N), 
      L is N+1. 
  
  % checks to see that the length of the list is greater than or equal to 3 and not empty.
  check_length( [] ).
  check_length( L  ):-
      listlength(L, Len),
      Len &gt;= 3,
      L \== [].    %This is the bit of code I'm having problems with 
                    it should be false if the list is just [] or empty.
  </code></pre>
  
  <p>I am a student so I don't necessarily need a straight answer I'm just trying to figure out what I'm doing wrong. </p>