Comp 372 program 3-ml: ML exercises Dordal, Nov 3, 1999 Due: Friday, Nov 12 Turn in your function definition together with a few sample tests 1. Write a function sumfun(n, f) that takes an int n and a function f:int->int and returns the sum f(1)+f(2)+...f(n). If n=0, return 0. 2. Write a function iterate(n, f, x) that applies function f to x n times: f(f(...f(x))). 3. *Using* iterate, write pow(x,n) = x^n (x to the nth power). Iterate the function fn y => x*y; if you apply this n times to 1 then you calculate x^n. 4. Using the mywhile function defined in class, implement the following while loop: x=1; y=20; z=0; w=0; while (x