let hamming_distance array1 array2 = assert (Array.length array1 = Array.length array2); Femtolib.Array.fold_lefti (fun i accu elt -> if elt = array1.(i) then accu else succ accu) 0 array2