PPT Slide
EQUALITY and INEQUALITY
Prolog provides built-in predicates for testing equality and inequality.
But you write them in INFIX!
a = a .
yes
a = b .
no
1 = 2 .
no
1 < 2 .
yes
1 = < 2 .
yes
1 \ = = 2 .
yes
NOTE!
between( X , A , B ) :- X > = A , X = < B .
P.21
Previous slide
Next slide
Back to first slide
View graphic version