customReverseListTheory

A database that implements custom "reverse" over lists; it should test backtracking functionality

my_reverse(L1, L2) :- my_rev(L1, L2, []).

my_rev([], L2, L2) :- !.
my_rev([X | Xs], L2, Acc) :- my_rev(Xs, L2, [X | Acc]).