Write a prolog predicate for a list, Programming Languages

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

Posted Date: 3/22/2013 5:54:31 AM | Location : United States







Related Discussions:- Write a prolog predicate for a list, Assignment Help, Ask Question on Write a prolog predicate for a list, Get Answer, Expert's Help, Write a prolog predicate for a list Discussions

Write discussion on Write a prolog predicate for a list
Your posts are moderated
Related Questions
Problem 6. Demonstrate how and when can you use the commands- vi, cat, chmod, grep, man, pwd, ps, kill, mkdir, rm demonstrating how and when the above 10 commands can be

what is the c.

about how to create the program in c

Write out the Syntax of Nested if Statements? The universal form is                         If(expression 1)                         {

MVC Framework The ASP.NET MVC Structure is a web program framework that tools the model-view-controller (MVC) design. According to ASP.NET, it allows application designers to devel

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

i am stuck on array part from getting response of jquery. anyone could help?

For this assignment you will need to design and construct a basic math program which targets elementary school children. Your program must adhere to the following steps and require

Please remember to read and follow all of the assignment guidelines. This assignment will expand upon the simulation algorithm given in class to produce a program which may be u