Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Presumably you could implement Church numerals [0] or something similar in the tree calculus.

[0] https://en.wikipedia.org/wiki/Church_encoding



Timur Latypoff's page (elsewhere in this thread but also: https://latypoff.com/tree-calculus-visualized/ ) shows a graphical view of this; you get to lists first—easy because tree structure is native here—and then a (natural) number is just a list of booleans, of arbitrary length, least significant first. Very elegant.


Cool, so Church Encoding of numbers is not needed after all. Seems much more simple to do as you describe, numbers are lists of bits. And that is how it is in computer memory too.

But, I thought the nodes of the tree in Tree Calculus were supposed to be "unlabeled". How can they then be booleans?

Ah, a short read through the link you provided explaines it simply. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: