What about
removeContig([], []).
removeContig([A], [A]).
removeContig([Hi , Hi | Ti], Lo) :-
removeContig([Hi | Ti], Lo).
removeContig([H1 , H2 | Ti], [H1 | To]) :-
H1 \= H2,
removeContig([H2 | Ti], To).
?
The trick is copy the head of the input list, as head of the output list, only if the following element is different.
Observe that it's neccessary the empty-list clause (removeContig([], []).) for the case the input list is empty.
--- Edit ---
As asked by OP, I try to improve the answer.
I have written four clauses for removeContig; the first two are terminal cases and I hope there isn't need of explanation.
removeContig([], []).
removeContig([A], [A]).
I point only the attention on the fact that the first one is needed only for the case you call removeContig with the input list empty.
Next... what we have to do?
The algorithm consist in copying the first element of the input list as first element of output list only and only if the second element of the input list is different.
So, excluded the terminal case (only one element in input list, so copy it in output list), we have two cases:
1) the first and the second element of the input list are equal, so delete (do not copy it) the first one
2) the first and the second element of the input list are different, so copy the fist one as first of the output list
The case (1) is managed by the following clause
removeContig([Hi , Hi | Ti], Lo) :-
removeContig([Hi | Ti], Lo).
where [Hi, Hi | Ti] say that the first two element are equals; in this case is called removeContig with the same argument except the first element in the input list that is, in this way, ignored.
The case (2) is managed by the following clause
removeContig([H1 , H2 | Ti], [H1 | To]) :-
H1 \= H2,
removeContig([H2 | Ti], To).
where [H1, H2 | Ti] and H1 \= H2 ensure us that the first two elements in the input list are different; in this case, we have to copy the first element in the input list (H1) as first element of the output list; and this is obtained with [H1 | To] where To is obtained from the following call to removeContig/2.