write a prolog predicate removenthnl1l2 that is


Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail. You can assume that N is strictly greater than 0. For instance:

?- remove_nth(4,[a,e,e,d,s,e],L).

L = [a,e,e,s,e] ;

No

?- remove_nth(6,[a,b],L).

No

 

Request for Solution File

Ask an Expert for Answer!!
Application Programming: write a prolog predicate removenthnl1l2 that is
Reference No:- TGS0220123

Expected delivery within 24 Hours