u3: refactors +murn/+turn, removing unused variable

This commit is contained in:
Joe Bryan 2020-10-11 00:19:43 -07:00
parent 880203ec1d
commit cabd811091
2 changed files with 37 additions and 47 deletions

View File

@ -6,42 +6,37 @@
u3_noun
u3qb_murn(u3_noun a, u3_noun b)
{
u3_noun pro = u3_nul;
u3_noun pro;
u3_noun* lit = &pro;
if ( u3_nul == a ) {
return u3_nul;
}
else {
u3_noun pro;
u3_noun* lit = &pro;
if ( u3_nul != a ) {
u3_noun* hed;
u3_noun* tel;
u3_noun res, i, t = a;
u3j_site sit_u;
u3j_gate_prep(&sit_u, u3k(b));
{
u3_noun* hed;
u3_noun* tel;
u3_noun res, i, t = a;
do {
u3x_cell(t, &i, &t);
do {
u3x_cell(t, &i, &t);
res = u3j_gate_slam(&sit_u, u3k(i));
res = u3j_gate_slam(&sit_u, u3k(i));
if ( u3_nul != res ) {
*lit = u3i_defcons(&hed, &tel);
*hed = u3k(u3t(res));
lit = tel;
u3z(res);
}
if ( u3_nul != res ) {
*lit = u3i_defcons(&hed, &tel);
*hed = u3k(u3t(res));
lit = tel;
u3z(res);
}
while ( u3_nul != t );
}
while ( u3_nul != t );
u3j_gate_lose(&sit_u);
*lit = u3_nul;
return pro;
}
*lit = u3_nul;
return pro;
}
u3_noun

View File

@ -6,37 +6,32 @@
u3_noun
u3qb_turn(u3_noun a, u3_noun b)
{
u3_noun pro = u3_nul;
u3_noun pro;
u3_noun* lit = &pro;
if ( u3_nul == a ) {
return u3_nul;
}
else {
u3_noun pro;
u3_noun* lit = &pro;
if ( u3_nul != a ) {
u3_noun* hed;
u3_noun* tel;
u3_noun i, t = a;
u3j_site sit_u;
u3j_gate_prep(&sit_u, u3k(b));
{
u3_noun* hed;
u3_noun* tel;
u3_noun i, t = a;
do {
u3x_cell(t, &i, &t);
do {
u3x_cell(t, &i, &t);
*lit = u3i_defcons(&hed, &tel);
*hed = u3j_gate_slam(&sit_u, u3k(i));
lit = tel;
}
while ( u3_nul != t );
*lit = u3i_defcons(&hed, &tel);
*hed = u3j_gate_slam(&sit_u, u3k(i));
lit = tel;
}
while ( u3_nul != t );
u3j_gate_lose(&sit_u);
*lit = u3_nul;
return pro;
}
*lit = u3_nul;
return pro;
}
u3_noun