2 ms·
Yes, that is a valid alternative encoding: https://en.wikipedia.org/wiki/Church_encoding#Represent_the_list_using_right_fold https://en.wikipedia.org/wiki/Churc
by derkha 10y ago
Yes, that is a valid alternative encoding: https://en.wikipedia.org/wiki/Church_encoding#Represent_the_list_using_right_fold https://en.wikipedia.org/wiki/Church_encoding#Represent_the_...
In general, what you describe is representing an inductive type by its _eliminator_: https://www.quora.com/In-type-theory-what-is-an-eliminator-and-what-is-its-opposite https://www.quora.com/In-type-theory-what-is-an-eliminator-a...