Answered step by step
Verified Expert Solution
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
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started