>>965
↓の isnil あたりを参考にすれば作れそう。
https://en.wikipedia.org/wiki/Church_encoding#List_encodings