summaryrefslogtreecommitdiff
path: root/vere/pkg/noun/jets/f/ut_fish.c
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
committerpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
commitfcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch)
tree51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/pkg/noun/jets/f/ut_fish.c
claude is gud
Diffstat (limited to 'vere/pkg/noun/jets/f/ut_fish.c')
-rw-r--r--vere/pkg/noun/jets/f/ut_fish.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/vere/pkg/noun/jets/f/ut_fish.c b/vere/pkg/noun/jets/f/ut_fish.c
new file mode 100644
index 0000000..e8acbd4
--- /dev/null
+++ b/vere/pkg/noun/jets/f/ut_fish.c
@@ -0,0 +1,35 @@
+/// @file
+
+#include "jets/q.h"
+#include "jets/w.h"
+
+#include "noun.h"
+
+u3_noun
+u3wfu_fish(u3_noun cor)
+{
+ u3_noun bat, sut, axe, van;
+
+ if ( (c3n == u3r_mean(cor, u3x_sam, &axe, u3x_con, &van, 0))
+ || (c3n == u3ud(axe))
+ || (u3_none == (bat = u3r_at(u3x_bat, van)))
+ || (u3_none == (sut = u3r_at(u3x_sam, van))) )
+ {
+ return u3m_bail(c3__fail);
+ }
+ else {
+ u3_weak vet = u3r_at(u3qfu_van_vet, van);
+ c3_m fun_m = 141 + c3__fish + ((!!vet) << 8);
+ u3_noun key = u3z_key_3(fun_m, sut, axe, bat);
+ u3_weak pro = u3z_find(u3z_memo_toss, key);
+
+ if ( u3_none != pro ) {
+ u3z(key);
+ return pro;
+ }
+ else {
+ pro = u3n_nock_on(u3k(cor), u3k(u3x_at(u3x_bat, cor)));
+ return u3z_save(u3z_memo_toss, key, pro);
+ }
+ }
+}