/*	
   flatten(Xs,Ys) :-
	Ys is a flattened list containing the elements in Xs.
*/
	:- op(40,xfx,\).

	flatten(Xs,Ys) :- flatten_dl(Xs,Ys\[]).
	
	flatten_dl([X|Xs],Ys\Zs) :-
	   flatten_dl(X,Ys\Ys1), flatten_dl(Xs,Ys1\Zs).
	flatten_dl(X,[X|Xs]\Xs) :-
	   constant(X), X \== [].
	flatten_dl([],Xs\Xs).

%	Program 15.2 : Flattening a list of lists using difference-lists
