What does E -> T
mean ? Variable E
implies variable T
?
This the code which is linked :
e(TS,R) :- t(TS,R).
Thanks for your help
What does E -> T
mean ? Variable E
implies variable T
?
This the code which is linked :
e(TS,R) :- t(TS,R).
Thanks for your help
Are you sure that you asking about E -> T
(if E
then T
) and not about e --> t
(lower case (thanks lurker!) and DCG syntax, where "DCG" is for "Definite Clause Grammar")?
Because the DCG syntax
e --> t.
is an alias (or a shortcut or syntactic sugar, if you prefer) for
e(L1, L2) :- t(L1, L2).
More generally speaking, the DCG syntax adds a couple of arguments, at the end of the clauses involved, making a chain on the right side of the :-
operator where the the start and the end of the chain are the arguments added on the left side.
So (by example)
d --> c1, c2, ...., cn.
is an alias for
d(L1, Lnp1) :- c1(L1, L2), c2(L2, L3), ..., cn(Ln, Lnp1).