summaryrefslogtreecommitdiff
path: root/ocaml/lib/mug.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/lib/mug.ml')
-rw-r--r--ocaml/lib/mug.ml17
1 files changed, 17 insertions, 0 deletions
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 *)
+