reverse

Duncan Patton a Campbell <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Organization NeoText
Message-ID <[email protected]>
revR([], []).
revR([H|T], L) :-
	revR1(T, L, [H]).

revR1([], L, L).
revR1([H|T], L, L1) :-
	revR1(T, L, [H|L1]).
 
This is just one obvious implementation.

Dhu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.