Int -> Int– it takes an
Intas its only argument and returns an
Intas the result. As functions are expressions, we can use them as any other type of data, for example, we can create a list of functions:
funListis a list of a certain type – specifically, a function type that takes two arguments of type
Numand returns a
Numtype as its result.