I am working on a larger project translating Haskell to Lambda calculus. I would like to give a lambda term to specific Haskell functions. I am not quite sure how to approach two of them. I went ahead and created the property each term should have, just to give you an idea of what I am trying to do.
What would the $\lambda$-terms for these Haskell functions be? If you could give a brief explanation that would be super helpful.
Function 1: $\mathsf{foldr}$: It should have the property
$$\mathsf{foldr} \, f \, u \, [N_1, \dots ,N_k] \to_\beta^* f N_1 (f N_2 (\dots (f N_k u)))$$
Function 2: $\mathsf{map}$: It should have the property
$$\mathsf{map} \, f \, [N_1, \dots,N_k] \to_\beta^* [f N_1,f N_2, \dots,f N_k]$$
Given that a list $[N_1, \dots, N_k]$ of $\lambda$-terms is represented by the $\lambda$-term $$\lambda c. \lambda n. c N_1 (c N_2( \dots(c N_k n) \dots ))$$ it is easy to define the $\lambda$-terms $\mathsf{foldr}$ and $\mathsf{map}$.