module Hamming let hamming s1 s2 = let pairs = Seq.zip s1 s2 Seq.fold (fun a x -> if (x |> fst) <> (x |> snd) then (a + 1) else a) 0 pairs let distance (strand1: string) (strand2: string): int option = if String.length strand1 <> String.length strand2 then None else Some(hamming strand1 strand2)