From fcedfddf00b3f994e4f4e40332ac7fc192c63244 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 5 Oct 2025 21:56:51 +0700 Subject: claude is gud --- vere/pkg/noun/jets/d/in_wyt.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 vere/pkg/noun/jets/d/in_wyt.c (limited to 'vere/pkg/noun/jets/d/in_wyt.c') diff --git a/vere/pkg/noun/jets/d/in_wyt.c b/vere/pkg/noun/jets/d/in_wyt.c new file mode 100644 index 0000000..2ae72fa --- /dev/null +++ b/vere/pkg/noun/jets/d/in_wyt.c @@ -0,0 +1,35 @@ +/// @file + +#include "jets/q.h" +#include "jets/w.h" + +#include "noun.h" + +STATIC_ASSERT( (UINT32_MAX > u3a_cells), + "width precision" ); + +static c3_w +_wyt_in(u3_noun a) +{ + if ( u3_nul == a ) { + return 0; + } + else { + u3_noun l_a, r_a; + u3x_trel(a, 0, &l_a, &r_a); + + return 1 + _wyt_in(l_a) + _wyt_in(r_a); + } +} + +u3_noun +u3qdi_wyt(u3_noun a) +{ + return u3i_word(_wyt_in(a)); +} + +u3_noun +u3wdi_wyt(u3_noun cor) +{ + return u3qdi_wyt(u3x_at(u3x_con_2, cor)); +} -- cgit v1.2.3