4 ms·
This seems cool, but I’m having difficulty understanding the specification. It would be nice if there were some examples of e.g. 2+3 , (lambda f. lambda x. (f (
by drdeca 2y ago
This seems cool, but I’m having difficulty understanding the specification. It would be nice if there were some examples of e.g. 2+3 , (lambda f. lambda x. (f (f x)))(lambda y. (y+2)) 3 ?
- lifthrasiir 2y ago`2 + 3` would be internally `((prim(3, 1) 2) 3)`, which can be composed of following fragments (where `^>v<` indicates the direction and the position of the current turnstile): AA prim(3, 1): >BBB C literal 2: AvB CC literal 3: AvB CCC A (prim(3,1) 2): >*****prim(3,1) * * 2 A ((prim(3,1) 2) 3): >*****(prim(3,1) 2) * * 3 So assuming that each distinct letter corresponds to a distinct color, one possible encoding would be: A A BB >>BBBBBCCCCCD B C AD B C D CBD DCA AAA BB The specification allows for a simple "identity" pattern which can be used to extend otherwise overlapping patterns here. The following, if I did everything right, would be more compact but much harder to decipher: CADABB >>BBCD CBDCAD AAABBD