I read many similar topics and still don't understand.
So the question is to create a function that has a specific type
for example given type Integer-> Integer a function that has that type is \x-> x+1. How to find lambda functions for the following types:
(((Int → a) → a) → b) → b(a -> b) -> ca → (a → a)(b -> c) -> (a -> b) -> a -> c
I solved 4. by guessing:
\f g a -> f (g a)
Three variables after lambda, f which has type b->c, g has type a->b, and a has type a.
:t \f g a -> f (g a)
I don't really get the steps just that there are inputs of type b->c, a->b and a. Then I guessed the order.
For 1. there is just one input so it should be \f-> \g->....