I'd appreciate it if someone could elaborate on the difference between the is
keyword and the = operator in prolog. I saw this discussion in == and =, but it excludes is
. The documentation talks about an unclear to me "unbound left operand." Can anyone elaborate?
I have a following example of is
:
age(Person,X) :-
birth_year(Person,Y1),
current_year(Y2),
X is Y2-Y1.
Is the difference assignment vs comparison? Any help is appreciated!
Edit: What is the relationship between == and is
? I am not asking the relationship of == and =, unless I have a misunderstanding of the aforementioned relationship.