Reference no: EM133361878
Question: Write in sml using pattern style of questions below of also showing sample runs.
1. Write a higher order function chcase to convert input string to uppercase.You may assume string contains only letters.
chcase("ChCase") > "CHCASE".
2.Write a function inde which returns index(start from1) of occurance of a given value. Use helper function of using two functions.
inde(1, [1,2,1,1,2,2,1]) > [1,3,4,7].
3.Write a function permu to generate permutation of identity list from 1 to n [1,2, .., n].
permu(2) > [[1,2], ,[2,1]] permu(3) > [[1,2,3],[2,1,3],[2,3,1],[1,3,2],[3,1,2],[3,2,1]].