Recursion function, Programming Languages

Use recursion to de ne a function position which has as input an integer, a character and a string and returns the result of inserting the character in the string at the position speci ed by the integer. For example: position 4

'a' "012xyz6" = "012xayz6"

An error message should be returned for negative input or if the position is more than the length of the string. De ne a function position2 which has the same e ect as position but which is de ned using take and drop instead of recursion

Posted Date: 3/1/2013 2:55:10 AM | Location : United States







Related Discussions:- Recursion function, Assignment Help, Ask Question on Recursion function, Get Answer, Expert's Help, Recursion function Discussions

Write discussion on Recursion function
Your posts are moderated
Related Questions
can you provide some assignments for JSP learning

Operation • This application uses an Alligator class that implements a Countable interface to display Alligator objects as shown above. • This application uses a Sheep class that i

(a) Define a procedure (subsets x) that takes a list as a single argument and returns all 2^n subsets of that list, i.e. the power set of the list; e.g. (subsets '(a b c)) ==> (

Question: (a) Explain the concepts of Inheritance and Polymorphism in Lingo programming. (b) Write short descriptions on parent scripts and child objects in Lingo object

What is .NET TECHNOLOGY? .NET technological innovation was presented by Enthusiasm, to get the industry from the SUN's Coffee. Few in the past, Enthusiasm had only VC++ and VB

This is the programming language of the Web. It is mainly used for validating forms. JavaScript & Java can be associated to each other. There exist several other differences betwee

1. Implement a program where an ellipse follows the perimeter of the window. 2. Implement a program that can draw graphs, possibly following your plan from last week. Have it gr

Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. Before attempting this exer

do you solve questions of assigments?

Question 1 Discuss on Inheritance Question 2 What are the four phases of the object modeling technique that can be repetitively executed? Question 3 Explain the di