3 ms·
`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 cur
by 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