Problem
Write using sml program of following questions along with sample runs.
I. Write a predicate suml to return sum of a hybrid integer list. (Hint use atomic to test wheater input is a list.) suml ([1, [2,3], [4],5],X)> X=15.
II. Implement predicate primeton to find all prime numbers from 2 to a given number n... primeton(20,X)> X=[2,3,5,7,11,13,17,19].
III. Write a predicate delnth to delte n-th element of list. You may assume that input string is always longer than n. delnth ([1, 2, [3,4], 5], 3, X) >X=[1,2,5].
IV. Write a predicate inde which returns an index (start from 1) of occurrence of given value. inde(1, [1,2,1,1,2,2,1],X)>X=[1,3,4,7].