1 answer

Using Haskell to write a program: fillNum fillNum takes an integer and a list of numbers to build...

Question:

Using Haskell to write a program: fillNum

fillNum takes an integer and a list of numbers to build a list of the specified length made up by repeating the numbers from the input list as many times as required. That is, the output list has the specified length same as the length specified by the input integer.

For example:

fillNum 4 [5,6,7,8,9,10] should output [5,6,7,8]

fillNum 9 [4,3,2,1] should output [4,3,2,1,4,3,2,1,4]

fillNum 7 [1,2,3] should output [1,2,3,1,2,3,1]


Answers

ting ·the numbes from tho irynt dist ag mary Jimeg mpla; dthe ist passed

.

Similar Solved Questions

1 answer
1. Consider the SN2 reaction shown below and answer the following questions. Br + acetone NaSCH—...
1. Consider the SN2 reaction shown below and answer the following questions. Br + acetone NaSCH— ^ SCH3 + NaBr A. Write the rate law for the reaction. B. Identify the nucleophile and the electrophile in the reaction. C. State how each of the following factors would affect the rate of the react...
1 answer
How do you multiply # (x+h)^3#?
How do you multiply # (x+h)^3#?...
1 answer
Stuff Company is a subsidiary of Pland Corporation and is located in Madrid, Spain, where the...
Stuff Company is a subsidiary of Pland Corporation and is located in Madrid, Spain, where the currency is the euro (€). Data on Stuff’s inventory and purchases are as follows: Inventory, January 1, 20X7 € 232,000 Purchases during 20X7 864,000 Inventory, December 31, 20...
1 answer
Sunland Inc. had beginning inventory of $11,400 at cost and $19,500 at retail. Net purchases were...
Sunland Inc. had beginning inventory of $11,400 at cost and $19,500 at retail. Net purchases were $124,328 at cost and $169,900 at retail. Net markups were $10,200, net markdowns were $7,000, and sales revenue was $132,900. Compute ending inventory at cost using the conventional retail method. (Roun...
1 answer
Find an equation for the line tangent to the graph of: f(x)=5xe^x at the point (a,f(a)) for a=2. what does y=?
Find an equation for the line tangent to the graph of: f(x)=5xe^x at the point (a,f(a)) for a=2. what does y=?...
1 answer
Name Ch. 2 WH /50 7. (10 points) A set of eight systolic blood pressures follows...
Name Ch. 2 WH /50 7. (10 points) A set of eight systolic blood pressures follows 110, 123, 132, 150, 127, 118, 102, 122 (a) (4 points) Create a five-number summary of the data (b) (3 points) Clearly identify whether or not there are any outliers in the dataset. Explain your answer using numbers (c) ...
1 answer
Please help i am confused 11. Which of the following should be added to net income...
please help i am confused 11. Which of the following should be added to net income in calculating net cash flow from operating active using the indirect method? a depreciation expense b. an increase in inventory c a gain on the sale of equipment d dividends declared and paid 12. The following inf...
1 answer
This Question: 2 pts 22 of 39 (17 complete) Solve the following logarithmic equation. Express irrational...
This Question: 2 pts 22 of 39 (17 complete) Solve the following logarithmic equation. Express irrational solutions in the exact form and as decimals. 2log 13(x - 2) - log 1350 = log 132 The solution set is (Use a comma to separate answers as needed. Simplify your answers. Type exact answers, using r...
1 answer
For F = 500 lb and G = 150 lb Solve for the force in each...
for F = 500 lb and G = 150 lb Solve for the force in each member, indicate whether the member is in tension or compression, and solve for the reaction forces. ЈУ F 17 ft х 10 ft Z 12 ft...
1 answer
Studies show that 12% of all patients treated in the ER are admitted to stay overnight....
Studies show that 12% of all patients treated in the ER are admitted to stay overnight. Of the patients treated, 1% have an adverse drug reaction and 12.4% are admitted overnight or have an adverse drug reaction. We select a patient at random. What is the probability that the patient will be admitte...
1 answer
Check m Moody Corporation uses a job-order costing system with a plantwide predetermined overhead rate based...
Check m Moody Corporation uses a job-order costing system with a plantwide predetermined overhead rate based on machine-hours. At the beginning of the year, the company made the following estimates: Machine-hours required to support estimated production Fixed manufacturing overhead cost Variable man...
1 answer
Does solid sodium chloride, a compound made of charged particles, conduct electricity? Why or why not?
Does solid sodium chloride, a compound made of charged particles, conduct electricity? Why or why not?...
1 answer
Ive attached an image as a reference for the plate data. For question #2 (second image),...
ive attached an image as a reference for the plate data. For question #2 (second image), construct a x-y scatter plot graph with temp ranges ok X axis amd amount of growth (turbidity) (0,1,2,3) on y axis. use different color or symbol per organism. DO NOT connect the dots. For each species, r...
1 answer
6. The table below shows the willingness to pay (WTP) for 9 customers for one jar...
6. The table below shows the willingness to pay (WTP) for 9 customers for one jar of honey from a rare bee from Shaolin. WTP ($) Customer Robert Gary Russell Clifford Corey Dennis Jason Elgin Lamont What is the total consumer surplus when the equilibrium price per jar of honey is $36. (2 points)...
1 answer
How do we know that the fundamental forces become unified as the energy of particle interactions increases?
How do we know that the fundamental forces become unified as the energy of particle interactions increases?...