:- module(_,_,[]).
% :- module(_, _).

% Operators allow using functors in prefix, postfix, or 
% infix syntax.  For example, if we include this 
% declaration in a file: 
%
%          v------- Infix operator, no associativity
:- op(500,xfx,is_father_of).
%     ^---- Precedence = 500
% 
% then these two facts:
% 
% is_father_of(john, peter).
% is_father_of(peter,jim).
%
% can be written as: 

john  is_father_of  peter. 
peter is_father_of  jim.

% Try: ?- is_father_of(X,Y).

% To activate the operator in the top level:
% ?- op(500,xfx,is_father_of).
% (this happens by default if module/2 is used)
% ?- X is_father_of Y.

% Another example for defining facts that are instructions 
% of an assembly language (just the syntax):

:- op(1100,fx,[load,mult,bne]).
:- op( 500,fx,@).
:- op(1200,xfx,:).
 
label1 : load @r3,r1.
         load 5,r2.
         mult r1,r2.
         bne  0,label1.
