Remix.run Logo
nextaccountic 17 hours ago

This is https://en.wikipedia.org/wiki/Church_encoding#Church_Boolean...

But there are other encodings

tromp 17 hours ago | parent [-]

This is both the Church encoding and the Scott encoding of the abstract data type

    data Bool = True | False
making it pretty much the only encoding you find in the literature.

This is quite different from the case of the natural numbers, where not only do the Church and Scott encoding differ, but there are several other reasonable representations fitting particular purposes.