Search code examples
mathprologoperatorsequalityarithmetic-expressions

Prolog =:= operator


There are some special operators in Prolog, one of them is is, however, recently I came across the =:= operator and have no idea how it works.

Can someone explain what this operator does, and also where can I find a predefined list of such special operators and what they do?


Solution

  • ?- 2+3 =:= 6-1.
    true.
    
    ?- 2+3 is 6-1.
    false.
    

    Also please see docs http://www.swi-prolog.org/pldoc/man?predicate=is/2