hamming distance haskell