% cut1.pl:  This database produces the Cartesian Product {a,b} X {1,2}
% in a rather strange way.  Here's the output (note the need to press
% the semicolon key to continue):
%
% ?- cartesian(A,B).
% A = a,
% B = 1 ;
% A = a,
% B = 2 ;
% A = b,
% B = 1 ;
% A = b,
% B = 2.
%
% {a,b} X {1,2} = {(a,1),(a,2),(b,1),(b,2)}.
%
% Where's the cut?  There isn't one ... yet.  See cut2.pl!

firstvalue(a).
firstvalue(b).
secondvalue(1).
secondvalue(2).

cartesian(X,Y) :- firstvalue(X), secondvalue(Y).
