Subversion Repositories programming

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 ira 1
/* int.pl */
2
 
3
/* enumerates integers */
4
 
5
 
6
nat(0).
7
nat(X) :- nat(Y), X is Y + 1.
8
 
9
int(X) :- nat(Y),X is ((-1)**(Y mod 2))*(Y // 2).
10