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
Expertsmind.com is expert in java assignment help JAVA Virtual Machine A Java exclusive device or java virtual machine (JVM) is an exclusive device able of undertaking Jav

I have a linux lab class that consist of 1 lab assignment per week for 5 weeks. It is an online virtual lab and is fairly easy, I just don''t have the time.

Why is this correct/when is this the right idea

This assignment is divided into two parts. The goal is to write a Java program that calculates capital gain on a stock market, see LabĀ 7. When a share of common stock of some co

can you provide some assignments for JSP learning

write c++ source code to find the number of digits in a given integer? pls ans

Who can help with MATLAB?

hello there, I making a program for the collage but I got stuck at one point, I have a timmer that moves object pnl with the pnl.left function, but I want it when it gets to end of

Write a program to calculate amount after n number of years by inputting principal at the rate of 8% interest.

Lennie McPherson, proprietor of Lennie''s Bail Bonds, needs to calculate the amount due for setting the bail. Lennie requires something of value as collateral, and his fee is 10%