VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
Find the last element of a list in prolog
my_last(X,[X]).
my_last(X,[_|L]) :- my_last(X,L).
No comments:
Post a Comment