order( [ X, X | Z ], [ X X | Z ] ).  % Error in this line
order( [ X, Y | Z ], [ X, Y | Z ] ):-
	less( X, Y ).
order( [ X, Y | Z ], [ Y, X | Z ] ):-
	less( Y X ). % Error in this line
	
bubble( [], [] ).
bubble( [ X ], [ X ] ).
bubble( [ X | ], W ):-  % Error in this line
	bubble( Y, [ U | V ] ), 
	order( [ X, U | V ], W ).

sort( [], [] ).
sort( Z, [ X | W ] ):-
	bubble( Z, [ X | Y ] ),
	sort( Y, W ).
