splitAt :: Int -> LeftTransformation a
        -> (LeftTransformation a, LeftTransformation a)
splitAt ix lt@(LeftTransformation nrs cs)
  | ix >= ncs = (lt, one nrs')
  | otherwise =
      let (csLeft, csRight) = V.splitAt ix cs
      in ( LeftTransformation nrs csLeft
         , LeftTransformation nrs' $ fmap (LTC.adjustOffset (+(nrs'-nrs))) csRight
         )
  where
    ncs = V.length cs
    nrs' = max 0 $ min nrs (nrs-ix)
splitAt :: Int -> LeftTransformation a
        -> (LeftTransformation a, LeftTransformation a)
splitAt ix lt@(LeftTransformation nrs cs)
  | ix >= ncs = (lt, one nrs')
  | otherwise =
      let (csLeft, csRight) = V.splitAt ix cs
      in ( LeftTransformation nrs csLeft
         , LeftTransformation nrs' $ fmap (LTC.adjustOffset (+(nrs'-nrs))) csRight
         )
  where
    ncs = V.length cs
    nrs' = max 0 $ min nrs (nrs-ix)
splitAt ix lt@(LeftTransformation nrs cs)
  | ix >= ncs = (lt, one nrs')
  | otherwise =
      let (csLeft, csRight) = V.splitAt ix cs
      in ( LeftTransformation nrs csLeft
         , LeftTransformation nrs' $ fmap (LTC.adjustOffset (+(nrs'-nrs))) csRight
         )
  where
    ncs = V.length cs
    nrs' = max 0 $ min nrs (nrs-ix)