summaryrefslogtreecommitdiff
path: root/ocaml/lib/mug.ml
blob: bf5eb326f88c3d37a197d8b6119d2e5382ce3161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 *)