I'm reading a book on the $\lambda$-calculus and I'm stuck on a list of representations. While practising different lambda calculus tasks I've stumbled upon an interesting issue. Given two terms I would like to understand what list is represented by those - or what is the actual process of transforming those.
I have two terms defined:
$F_n$ and $F'_n$ for each natural number $n \in \mathbb{N} $ is defined as following:
- $n$ is either a number or a Church encoding,
- $m$ and $c$ are variables.
$F'_0 = m$
$F'_n = c n F'_{n-1}$ for $n > 0$
$F_n =\lambda c. \lambda m.F'_n $
The question is what kind of list does the term $F_n$ represent?
Expanding a bit on the question as the context was marked as insufficient. Understanding how different lists are represented in lambda calculus is an important part of a learning process, moreover, I haven't found any great sources on how in the general process given terms into a specific list type. The provided answer nicely highlights the process of transitioning a term into an actual list representation.