diff options
author | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
commit | fcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch) | |
tree | 51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/pkg/noun/jets/c/ham.c |
claude is gud
Diffstat (limited to 'vere/pkg/noun/jets/c/ham.c')
-rw-r--r-- | vere/pkg/noun/jets/c/ham.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vere/pkg/noun/jets/c/ham.c b/vere/pkg/noun/jets/c/ham.c new file mode 100644 index 0000000..776cf0c --- /dev/null +++ b/vere/pkg/noun/jets/c/ham.c @@ -0,0 +1,27 @@ +/// @file + +#include "jets/q.h" +#include "jets/w.h" + +#include "noun.h" + +u3_atom +u3qc_ham(u3_atom a) +{ + c3_w len_w = u3r_met(5, a); + c3_d pop_d = 0; + c3_w wor_w; + + for ( c3_w i_w = 0; i_w < len_w; i_w++ ) { + wor_w = u3r_word(i_w, a); + pop_d += c3_pc_w(wor_w); + } + + return u3i_chub(pop_d); +} + +u3_noun +u3wc_ham(u3_noun cor) +{ + return u3qc_ham(u3x_atom(u3h(u3t(cor)))); +} |