samelength([], []).
  samelength([_|X], [_|Y]) :- samelength(X,Y).

The _ is an anonymous variable. Each occurrence of it stands for a different variable.