11.Write a Prolog program to implement conc (L1, L2, L3) where L2 is the list to be appended with L1 to get the resulted list L3.
% Write a Prolog program to implement conc (L1, L2, L3) where L2 is the
list to be appended with L1 to get the resulted list L3.
% below conc function is not predefined you can use any name as function
conc([],L1,L1).
conc([X|T],L2,[X|T1]):- conc(T,L2,T1).
% Output
No comments:
Post a Comment