Church lists in Haskell
问题 I had to implement the haskell map function to work with church lists which are defined as following: type Churchlist t u = (t->u->u)->u->u In lambda calculus, lists are encoded as following: [] := λc. λn. n [1,2,3] := λc. λn. c 1 (c 2 (c 3 n)) The sample solution of this exercise is: mapChurch :: (t->s) -> (Churchlist t u) -> (Churchlist s u) mapChurch f l = \c n -> l (c.f) n I have NO idea how this solution works and I don't know how to create such a function. I have already experience with