title: Syntax error in Prolog regarding <>
body: <p>I have this Prolog code that must calculate the successor of a number, the number being represented in a list. The problem is that the code generates the "Syntax error: Operator expected" error on the -N&lt;>0 part of the code. I searched everywhere for an equivalent of &lt;>, but this is how I find it everywhere and how I learned it in class. What should I change to fix the error?</p>
  
  <pre><code>%successor of a number represented on a list
  %[1 9 3 5 9 9]--&gt;[1 9 3 6 0 0]
  %domains
  %   el=integer
  %   list=el*
  %predicates
  %   add_fn(el,list,list)
  %   inverted(list,list)
  %   succesor(list,list)
  %   suc(list,list,integer)
  %clauses
     add_fn(E,[],[E]).
     add_fn(E,[H|T],[H|L]):-add_fn(E,T,L).
  
     inverted([],[]).
     inverted([H|T],L):-inverted(T,L1),add_fn(H,L1,L).
  
     succesor([],[]):-!.
     succesor(L,R):-inverted(L,LM),suc(LM,S,1),inverted(S,R).
  
     suc([],[],_):-!.
     suc([H|T],[H|L],N):-N=0,!,suc(T,L,0).
     suc([H|T],[M|L],N):-N&lt;&gt;0,!,S=H+N,M=S mod 10,N1=S div 10,suc(T,L,N1).
  </code></pre>