Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer below! 3. SML functions (a) Write a function double that takes a list as a parameter and returns a list where each element

image text in transcribedPlease answer below!

3. SML functions (a) Write a function double that takes a list as a parameter and returns a list where each element is repeated. For example, double ([1,2,3])=[1,1,2,2,3,3]. You can use map but it is not mandatory in this question. The function must be tested in an IDE and post the screenshot of your running and tested code (with at least 3 tests). (b) We consider the mc91 function below. fun ma91 (n)= if n>100 then n10 else ma91 (ma91(n+11)); i. What is the map function and its type? ii. What is the result of the evaluation of the following expression? Explain your answer. mapmc91[103,102,101,100,99,98,97,96]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

here) and other areas you consider relevant.

Answered: 1 week ago