Question: Write these in SML Write these functions in ML(SML) : Write a function dup to double each element of an integer list. One function only.
Write these in SML
- Write these functions in ML(SML) :
- Write a function dup to double each element of an integer list. One function only. dup([2,3,5]) [2,2,3,3,5,5]
- Write a function dups to double each char of a string. Recursion must on list not string. dups("aabc") "aaaabbcc"
- Write a function mid to keep elements of an integer list between 5 and 10. One function only. mid [12,3,6,4,5,1] [6,5]
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
