Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,24 @@
chget=: {{(0;1;1;1) {:: y}}
chset=: {{
'A B'=.;y
'C D'=.B
'E F'=.D
<A;<C;<E;<<.x
}}
ch0=: {{
if.0=#y do.y=.;:'>:' end. NB. replace empty gerund with increment
0 chset y`:6^:2`''
}}
apply=: `:6
chNext=: {{(1+chget y) chset y}}
chAdd=: {{(x +&chget y) chset y}}
chSub=: {{(x -&chget y) chset y}}
chMul=: {{(x *&chget y) chset y}}
chExp=: {{(x ^&chget y) chset y}}
int2ch=: {{y chset ch0 ''}}
ch2int=: chget

View file

@ -0,0 +1,14 @@
three=: chNext^:3 ch0''
four=: chNext^:4 ch0''
sixtyfour=: four chExp three
eightyone=: three chExp four
four apply 1
16
chget three
3
chget four
4
chget sixtyfour
64
chget eightyone
81

View file

@ -0,0 +1,11 @@
three apply 0
3
three apply 10
13
four=: 4 chset ch0 {{2*y}}`''
chget four
4
four apply 0
0
four apply 10
160

View file

@ -0,0 +1,9 @@
four=: 4 chset ch0 +:`''
four apply 10
160
(three chSub four) apply 10
5
(sixtyfour chSub three chExp four) apply 10x^20
762939453125000
(sixtyfour chSub three chExp 4 chset ch0 5x&*`'') apply 10x^20
131072000