From d21900836f89b2bf9cd55ff1708a4619c8b89656 Mon Sep 17 00:00:00 2001 From: polwex Date: Mon, 20 Oct 2025 13:13:39 +0700 Subject: neoinit --- ocaml/lib/mug.ml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ocaml/lib/mug.ml (limited to 'ocaml/lib/mug.ml') diff --git a/ocaml/lib/mug.ml b/ocaml/lib/mug.ml new file mode 100644 index 0000000..bf5eb32 --- /dev/null +++ b/ocaml/lib/mug.ml @@ -0,0 +1,17 @@ + + + (* Compute murmur3 hash of a noun *) + (* let compute_mug (noun : noun) : int32 = *) + (* let rec hash_noun n = *) + (* match n with *) + (* | Atom z -> *) + (* let bytes = Z.to_bits z in *) + (* murmur3_hash32 bytes *) + (* | Cell (h, t) -> *) + (* let h_mug = hash_noun h in *) + (* let t_mug = hash_noun t in *) + (* Combine hashes - simplified version *) + (* Int32.logxor h_mug t_mug *) + (* in *) + (* hash_noun noun *) + -- cgit v1.2.3