Demonstrate a function in scheme language

Assignment Help Computer Engineering
Reference no: EM132198926

Write and fully demonstrate a function in "Scheme language" named super-duper, with this interface:

(super-duper source count)

The function returns a copy of the list source, with every element duplicated count times. If source is an atom, it is immediately returned, without duplication.

For example:

(super-duper 123 1)

123

(super-duper 123 2)

123

(super-duper '() 1)

()

(super-duper '() 2)

()

(super-duper '(x) 1)

(x)

(super-duper '(x) 2)

(x x)

(super-duper '(x y) 1)

(x y)

(super-duper '(x y) 2)

(x x y y)

(super-duper '((a b) y) 3)

((a a a b b b) (a a a b b b) (a a a b b b) y y y)

Reference no: EM132198926

Questions Cloud

Write a short program to test your function : Write a function in C that takes three parameters: the address of a two-dimensional array of type int, the number of rows in the array.
Management perspective for data-mining software project : Discuss the major risk management functions from a project management perspective for the data-mining software project.
Minimum average total cost curves : Companies can typically maximize their profits by operating at the minimum average total cost curves, independent of the economic environment.
What is the implied risk premium : Does uncovered interest parity hold in this example? If so, how do you know? If not, what is the implied risk premium? Which deposits pay a higher expected.
Demonstrate a function in scheme language : Write and fully demonstrate a function in "Scheme language" named super-duper, with this interface.
Write a function that takes two parameters : Write a function called findMedian that takes two parameters - an array of int and the size of the array.
Find all subgame nash equilibria of finitely repeated game : Find all of the game's pure-strategy Nash equilibria. Now suppose that the players play this game twice in a row. They observe what each other did in the first.
What is the situation of the private sector in each period : In 2009 country has a fiscal deficit of 4.2% of its GDP and it has a deficit in the external sector of 2.6% of its GDP.
Write a function called truncate : Write a function called truncate. It is passed 2 parameters, a float f and an integer d.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down python program

Write down Python program

  Create a threaded class that races by counting

Create a threaded class that "races" by counting and displaying the numbers from 1 to 10.

  Create and use a subroutine that takes single character

Create and use a subroutine that takes single character parameter and displays a count of the number of environment variables that start with the subroutine.

  Describe four cons of virtualization

Many nameservers use a file backend configuration whereas some use a database backend allowing for instant DNS updates. Discuss some pros/cons to each.

  How would the given customer be classified

Specify the success class as 1 (loan acceptance), and use the default cutoff value of 0.5. How would this customer be classified?

  Find three other devices that can track the movement

Find at least three other devices that can track the movement of your hands, eyes, or other body parts without the need to touch the input device.

  Create a good design of functions to make best use of code

Create a good design of the functions to make the best use of the code and avoid duplicate calculations. You also need to design your program so that it has components that can be reused in another program, if needed.

  Write an arduino c language function printstr

Write an ARDUINO C function called strlen() that determines the length of a null-terminated ASCII string. Pass a 16-bit address pointer to the first element of the string to the function. Return the length, excluding the null byte.

  Question1 a multiprogramming operating system uses an

question1. a multiprogramming operating system uses an apportioning method and divides the 60 mb of existing memory

  What is printed by the given program

What is printed by the following program? Suppose the input is the following: Miller 34 340 #include #include using namespace std; const int PRIME_NUM = 11; int main () { const int SECRET = 17; string name

  Write separate sql statements to insert data into the table

Write 2 separate SQL statements to insert data into the table that you just created.

  Analyze the significance of the stuxnet malicious code event

Analyze the significance of the STUXNET malicious code events in Iran, and the significance of the Dragonfly malicious code currently found.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd