Alternative to the Church, Scott and Parigot encodings of data on the Lambda Calculus.
When it comes to encoding data on the pure λ-calculus (without complex extensions such as ADTs), there are 3 widely used approaches.
The Church Encoding, which represents data structures as their folds. Using Caramel’s syntax, the natural number 3 is, for example. represented as:
0 c0 = (f x -> x) 1 c1 = (f x -> (f x)) 2 c2 = (f x -> (f (f x)))