mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
using u3x functions
This commit is contained in:
parent
def6538c08
commit
2769cb2ac9
@ -30,33 +30,23 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
u3_noun i_lis = u3h(lis);
|
||||
u3_noun t_lis = u3t(lis);
|
||||
|
||||
if (c3y != u3du(i_lis)) { u3m_bail(c3__exit); }
|
||||
|
||||
u3_noun typ = u3h(i_lis);
|
||||
|
||||
u3_noun i_lis, t_lis, fot, typ;
|
||||
u3_noun p_typ, q_typ, pq_typ, qq_typ, rq_typ;
|
||||
|
||||
u3x_cell(lis, &i_lis, &t_lis);
|
||||
u3x_cell(i_lis, &typ, &fot);
|
||||
|
||||
if ( (c3n == u3du(typ)) ||
|
||||
(c3__core != u3h(typ)) ) {
|
||||
return u3m_error("felt-core");
|
||||
}
|
||||
else if
|
||||
( (c3n == u3r_cell(u3t(typ), &p_typ, &q_typ)) ||
|
||||
(c3n == u3r_trel(q_typ, &pq_typ, &qq_typ, &rq_typ)) )
|
||||
{
|
||||
return u3m_bail(c3__exit);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
u3x_cell(u3t(typ), &p_typ, &q_typ);
|
||||
u3x_trel(q_typ, &pq_typ, &qq_typ, &rq_typ);
|
||||
|
||||
u3_noun dox = u3nt(c3__core, u3k(qq_typ), u3k(q_typ));
|
||||
u3_noun par = u3nt(c3__hold, dox, u3nc(u3_nul, 1));
|
||||
u3_noun pro = u3nc(par, u3qfu_felt_arm(t_lis));
|
||||
|
||||
return pro;
|
||||
}
|
||||
}
|
||||
@ -71,34 +61,24 @@
|
||||
static u3_noun
|
||||
u3qfu_felt(u3_noun lap)
|
||||
{
|
||||
u3_noun pro;
|
||||
|
||||
if (c3y != u3du(lap)) { u3m_bail(c3__exit); }
|
||||
|
||||
u3_noun lim = u3h(lap);
|
||||
u3_noun pro, lim, mil;
|
||||
u3x_cell(lap, &lim, &mil);
|
||||
|
||||
if ( c3y == lim ) {
|
||||
|
||||
u3_noun p_lap = u3t(lap);
|
||||
pro = u3k(p_lap);
|
||||
|
||||
pro = u3k(mil);
|
||||
}
|
||||
else if ( c3n == lim ) {
|
||||
|
||||
u3_noun tal_lap = u3t(lap);
|
||||
|
||||
if (u3du(tal_lap) != c3y) { u3m_bail(c3__exit); }
|
||||
|
||||
u3_noun q_lap = u3t(tal_lap);
|
||||
u3_noun p_lap, q_lap;
|
||||
u3x_cell(mil, &p_lap, &q_lap);
|
||||
u3_noun lis = u3qdi_tap(q_lap);
|
||||
u3_noun hos = u3qfu_felt_arm(lis);
|
||||
|
||||
pro = u3kf_fork(hos);
|
||||
u3z(lis);
|
||||
|
||||
}
|
||||
else { u3m_bail(c3__exit); }
|
||||
|
||||
else {
|
||||
u3m_bail(c3__exit);
|
||||
}
|
||||
return pro;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user