5 lines
138 B
Perl
5 lines
138 B
Perl
|
% Define the rule to sum 2 numbers
|
||
|
sum(X, Y, Z) :- Z is X + Y.
|
||
|
|
||
|
% Define the rule to know if a number is even.
|
||
|
is_even(X) :- 0 is X mod 2.
|