replaceCharAtPos:: Int -> Char -> String -> String
replaceCharAtPos i v (h:t)
  | i == 0 = v:t
  | otherwise = h:replaceCharAtPos (i-1) v t
replaceCharAtPos:: Int -> Char -> String -> String
replaceCharAtPos i v (h:t)
  | i == 0 = v:t
  | otherwise = h:replaceCharAtPos (i-1) v t
replaceCharAtPos i v (h:t)
  | i == 0 = v:t
  | otherwise = h:replaceCharAtPos (i-1) v t