Write a predicate rotate/2
that is true if the difference list in the second
argument is the difference list in the first argument rotated. You may assume
that the tail of the difference list in the first argument is not bound when
called.
?- rotate([1,2,3,4|X]-X, B-[]).
X = ...,
B = [2, 3, 4, 1].