3 ms·
Yes. You encode true as λx.λy.x and false as λx.λy.y and then (if p then a else b) becomes just (p a b). See https://en.wikipedia.org/wiki/Church_encoding#Chur
by edflsafoiewq 8y ago
Yes. You encode true as λx.λy.x and false as λx.λy.y and then (if p then a else b) becomes just (p a b).
See https://en.wikipedia.org/wiki/Church_encoding#Church_Booleans https://en.wikipedia.org/wiki/Church_encoding#Church_Boolean.... That page also has encodings of pairs and lists.
- sevensor 8y agoWhoa. That's really cool! Thanks for the link.