Prolog program to reverse a given List.
domains l = integer* predicates reverse_list(l,l) reverse(l,l,l) clauses reverse_list(IN,OUT) :- reverse(IN,[],OUT). reverse([],IN,IN). reverse([Head|Tail],List1,List2) :- reverse(Tail,[Head|List1],List2).