Question: Consider the following function in ML. What is its inferred type? fun fib (iszero, isone, dec, add, n) if iszero(n) then n else if isone(n)

Consider the following function in ML. What is its inferred type? fun fib (iszero, isone, dec, add, n) if iszero(n) then n else if isone(n) then n else add( fib(iszero, isone, dec, add, dec(n) fib(iszero, isone, dec, add, dec(dec(n))) ('bool) (a-> bool (-> 'aaa -> 'a)'a 'a O (int->bool) (int-bool (int -int) (int int->int) int- int none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
