Files
mercury/tests/dppd/remove_impl.m
Peter Ross 51497341cc Add the DPPD (dozens of problems in partial deduction) suite to the
Estimated hours taken: 0.1

Add the DPPD (dozens of problems in partial deduction) suite to the
tests directory.
1999-02-20 11:34:42 +00:00

25 lines
295 B
Mathematica

:- module remove_impl.
:- interface.
:- import_module list.
:- pred rr(list(T)::in, list(T)::out) is det.
:- implementation.
rr(X,Y) :- r(X,T), r(T,Y).
:- pred r(list(T)::in, list(T)::out) is det.
r([],[]).
r([X],[X]).
r([X,Y|T],[X|T1]) :-
( X = Y ->
r(T,T1)
;
r([Y | T], T1)
).