Reputation: 21
What do those /2 /3
that I see in example code do?
Like this one:
4 ?- trace([equals,contains]).
% equals/2: [call, redo, exit, fail]
% contains/2: [call, redo, exit, fail]
Upvotes: 2
Views: 2709
Reputation: 5020
Learn Prolog Now! is a nice tutorial.
In Prolog, lines starting with a '%' are comments.
equals/2
describes a functor named equals
with the arity of two, which means that it expects two arguments.
Upvotes: 4