jet +-wyt:in

This commit is contained in:
Paul Driver 2016-11-08 17:26:24 -08:00
parent 83a74d4757
commit 1dfa5e4411
5 changed files with 35 additions and 0 deletions

View File

@ -256,6 +256,7 @@ J_D_OFILES=\
jets/d/in_put.o \ jets/d/in_put.o \
jets/d/in_tap.o \ jets/d/in_tap.o \
jets/d/in_uni.o \ jets/d/in_uni.o \
jets/d/in_wyt.o \
jets/d/in_bif.o \ jets/d/in_bif.o \
jets/d/in_dif.o \ jets/d/in_dif.o \
jets/d/by_gas.o \ jets/d/by_gas.o \

View File

@ -90,6 +90,7 @@
u3_noun u3qdi_put(u3_noun, u3_noun); u3_noun u3qdi_put(u3_noun, u3_noun);
u3_noun u3qdi_tap(u3_noun, u3_noun); u3_noun u3qdi_tap(u3_noun, u3_noun);
u3_noun u3qdi_uni(u3_noun, u3_noun); u3_noun u3qdi_uni(u3_noun, u3_noun);
u3_noun u3qdi_wyt(u3_noun);
/** Tier 5. /** Tier 5.
**/ **/

View File

@ -95,6 +95,7 @@
u3_noun u3wdi_put(u3_noun); u3_noun u3wdi_put(u3_noun);
u3_noun u3wdi_tap(u3_noun); u3_noun u3wdi_tap(u3_noun);
u3_noun u3wdi_uni(u3_noun); u3_noun u3wdi_uni(u3_noun);
u3_noun u3wdi_wyt(u3_noun);
/** Tier 5. /** Tier 5.
**/ **/

30
jets/d/in_wyt.c Normal file
View File

@ -0,0 +1,30 @@
/* jets/d/in_wyt.c
**
*/
#include "all.h"
/* functions
*/
u3_noun u3wdi_wyt(u3_noun cor)
{
u3_noun a;
if ( c3n == u3r_mean(cor, u3x_con_2, &a, 0) ) {
return u3m_bail(c3__exit);
} else {
return u3qdi_wyt(a);
}
}
u3_noun u3qdi_wyt(u3_noun a)
{
u3_noun n_a, l_a, r_a;
if ( u3_nul == a ) {
return 0;
}
else if ( c3n == u3r_trel(a, &n_a, &l_a, &r_a) ) {
return u3m_bail(c3__exit);
}
else {
return u3i_vint(u3ka_add(u3qdi_wyt(l_a), u3qdi_wyt(r_a)));
}
}

View File

@ -107,6 +107,7 @@ static u3j_harm _mood__hoon__in_mer_a[] = {{".2", u3wdi_mer}, {}};
static u3j_harm _mood__hoon__in_put_a[] = {{".2", u3wdi_put}, {}}; static u3j_harm _mood__hoon__in_put_a[] = {{".2", u3wdi_put}, {}};
static u3j_harm _mood__hoon__in_tap_a[] = {{".2", u3wdi_tap}, {}}; static u3j_harm _mood__hoon__in_tap_a[] = {{".2", u3wdi_tap}, {}};
// static u3j_harm _mood__hoon__in_uni_a[] = {{".2", u3wdi_uni}, {}}; // static u3j_harm _mood__hoon__in_uni_a[] = {{".2", u3wdi_uni}, {}};
static u3j_harm _mood__hoon__in_wyt_a[] = {{".2", u3wdi_wyt}, {}};
static u3j_core _mood__hoon__in_d[] = static u3j_core _mood__hoon__in_d[] =
{ { "bif", _mood__hoon__in_bif_a }, { { "bif", _mood__hoon__in_bif_a },
{ "dif", _mood__hoon__in_dif_a }, { "dif", _mood__hoon__in_dif_a },
@ -116,6 +117,7 @@ static u3j_core _mood__hoon__in_d[] =
// { "int", _mood__hoon__in_int_a }, // { "int", _mood__hoon__in_int_a },
{ "put", _mood__hoon__in_put_a }, { "put", _mood__hoon__in_put_a },
{ "tap", _mood__hoon__in_tap_a }, { "tap", _mood__hoon__in_tap_a },
{ "wyt", _mood__hoon__in_wyt_a },
// { "uni", _mood__hoon__in_uni_a }, // { "uni", _mood__hoon__in_uni_a },
{} {}
}; };