What is the difference between a strongly statically typed language and a weakly statically typed language?
What is the defining characteristic of a dynamically typed language?
Given the definition
f([]) = [] f(h::t) = (h*h)::f(t) when h > 10 f(h::t) = f(t) when h ≤ 10show an inside-out evaluation of expression f([4,12,15,6,11]). Show the entire expression at each step. Assume that arithmetic is done as soon as possible.
Suppose that function f in the preceding problem is is restricted to lists of integers. What is the type of f?
Write an equational definition of a function called smallest so that smallest(n,x) is the smallest member of list n::x. For example, smallest(3, [6,4,7]) = 3 and smallest(8, [2,5]) = 2. You may presume that you have a function called min that takes the minimum of two numbers. For example, min(7,4) = 4.
Show an inside-out evaluation of smallest(4, [2,6,1]), using your definition from the preceding question.
Suppose that function f is defined by
f(x,y) = (y, head(x))what is the most general polymorphic type of f? Use Greek letters for type variables.