#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Options

# Question 1.1 - Functions in mathematics and Haskell

edited January 19

Functions in mathematics and Haskell.

Suppose $$f : Int \to Int$$ sends an integer to its square, $$f(x) := x^2$$ and that $$g : Int \to Int$$ sends an integer to its successor, $$g(x) := x+ 1$$.

(a) Write $$f$$ and $$g$$ in Haskell, including their type signature and their implementation.

(b) Let $$h := f◦g$$. What is $$h(2)$$?

(c) Let $$i := f ; g$$. What is $$i(2)$$?