mkDigitBinding :: Char -> VimBinding
mkDigitBinding c = mkBindingE Normal Continue (char c, return (), mutate)
  where
    mutate vs@(VimState {vsCount = Nothing}) = vs { vsCount = Just d }
    mutate vs@(VimState {vsCount = Just count}) =
      vs { vsCount = Just $ count * 10 + d }
    d = ord c - ord '0'
mkDigitBinding :: Char -> VimBinding
mkDigitBinding c = mkBindingE Normal Continue (char c, return (), mutate)
  where
    mutate vs@(VimState {vsCount = Nothing}) = vs { vsCount = Just d }
    mutate vs@(VimState {vsCount = Just count}) =
      vs { vsCount = Just $ count * 10 + d }
    d = ord c - ord '0'
mkDigitBinding c = mkBindingE Normal Continue (char c, return (), mutate)
  where
    mutate vs@(VimState {vsCount = Nothing}) = vs { vsCount = Just d }
    mutate vs@(VimState {vsCount = Just count}) =
      vs { vsCount = Just $ count * 10 + d }
    d = ord c - ord '0'