VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
Reverse a list.
my_reverse(L1,L2) :- my_rev(L1,L2,[]).
my_rev([],L2,L2) :- !.
my_rev([X|Xs],L2,Acc) :- my_rev(Xs,L2,[X|Acc]).
No comments:
Post a Comment